Professional Documents
Culture Documents
• Pros:
– Are less likely to extend dynamically
– Deliver a small performance benefit
– Enable the server process to read the entire extent
map with a single I/O operation
• Cons:
– Free space may not be available
– May contain unused space
Columns Blocks
Table A Table B
Rows
Segment Segment
Table
Tablespace
Block header
Growth
Free space
Row data
Segments
Extents
Blocks
• Advantages:
– Reduces block contention
– Is good for small rows
– Is good for random access
• Disadvantages:
– Has a relatively large space overhead
– Has a small number of rows per block
– Can cause more index blocks to be read
• Advantages:
– Less space overhead
– Good for sequential access
– Good for very large rows
– Better performance of index reads
• Disadvantages:
– Increases block contention
– Uses more space in the buffer cache
1 2
Inserts
Inserts
3 PCTUSED 4
… BMB
BMB BMB BMB BMB
BMB …
BMB BMB
S BMB …
E
G BMB …
BMB BMB
M
E …
N …
… … … DATA
T
Block …
…
{
Extent
Inserts Inserts
75%
50%
1 25%
2
Inserts
Inserts
3 4
Migration
Chaining
Index Table
• PCTFREE
– Default: 10
– Zero if no UPDATE activity
– PCTFREE = 100 × UPD / (average row length)
• PCTUSED
– Only with free lists
– Default: 40
– Set if rows are deleted
– PCTUSED = 100 – PCTFREE – (100 × rows × average
row length / block size)
...
• Export/import:
– Export the table.
– Drop or truncate the table.
– Import the table.
• MOVE table command:
– ALTER TABLE EMPLOYEES MOVE
• Online table redefinition
• Copy migrated rows:
– Find migrated rows by using ANALYZE.
– Copy migrated rows to a new table.
– Delete migrated rows from the original table.
– Copy rows from the new table to the original table.
Data
Unused Unused
Data
space space
HWM
Shrink
operation
Reclaimed space
HWM
HWM
1
HWM
HWM
Database
Tablespace
Data Data
SMALLFILE BIGFILE
file file
BFT 1 … BFT n
One-to-one
mapping
4 billion 8 EB
blocks