PCTFREE ("high water" mark) and PCTUSED ("low water" mark) parameters control the use of free space for inserts and updates in data blocks
Both parameters can only be specified when creating or altering tables and clusters
PCTFREE parameter can be specified when creating or altering indexes
PCTFREE parameter determines the percentage of a data block to be reserved (kept free) for the possible updates to rows that are already stored in the block
"High water" and "low water" marks
After a data block becomes full, as determined by PCTFREE, the block is not considered for insertion of new rows until
the percentage of the block being used falls below the parameter PCTUSED
A data block which is not considered for insertion of new rows is a excluded from a list of blocks available for insertions
CREATE TABLE EMPLOYEE(
E# NUMBER (5) NOT NULL,
ENAME VARCHAR(20) NOT NULL,
... ... ... )
PCTFREE 5
PCTUSED 75;
reduces processing costs duringUPDATEandDELETEstatements for moving a block to the free list of blocks when it has fallen below that percentage of usage,
The sum ofPCTFREEandPCTUSEDmust be equal or less than 100
If the sum is less than 100, then the ideal compromise of space utilization and I/O performance is a sum ofPCTFREEandPCTUSEDthat differs from 100 by the percentage of space in the available block that an average row occupies
PCTFREE versus PCTUSED
Performance related observations:
Dependencies betweenPCTFREEandPCTUSED
If the sum is equal 100 then database system attempts to keep no more thanPCTFREEfree space and the processing costs are the highest
The smaller the difference between 100 and the sum ofPCTFREEandPCTUSED, the more efficient space usage is at some performance costs
PCTFREE versus PCTUSED
Example 1
UPDATE statements frequently increase the size of rows, PCTFREE = 20 PCTUSED = 40
PCTFREE is set to 20 to allow enough room for rows that
increase in size
PCTUSED is set to 40 so that less processing is done during
high update activity
PCTFREE versus PCTUSED
Example 2
Most operations include INSERT and DELETE statements and most of UPDATE statements do not increase the size of rows, PCTFREE = 5 PCTUSED = 60
PCTFREE is set to 5 because most of UPDATE statements do not increase the size of rows
PCTUSED is set to 60 so that space freed by DELETEstatements is used soon
PCTFREE versus PCTUSED
Example 3
A table is very large, therefore storage is a primary concern, and most processing includes read-only transactions, PCTFREE = 5 PCTUSED = 90
PCTFREE is set to 5 because UPDATE statements are rare
PCTUSED is set to 90 so that more space per block is used to store data