

The term ‘space utilization’ refers to the percentage of available space that is actually filled with user data.

What does space utilization and fragmentation mean? Sort the data in the table in the order of the index key to improve the index clustering factor.1.After shrinking the table and indexes, to take advantage in terms of performance, you should:.May decrease the number of leaf blocks in the index thereby reducing cost of index access.Shrinking of an index coalesces the space freed upon deleting the rows.Can increase CF of the index and hence the cost of accessing the table via the index may increase.Causes deleted rows to be removed from the index.Compacting of a fragmented table / index:.Create and populate a table called organized, with 400 distinct IDs and 7 rows per ID.

Performance of table access via the index.

Reorganizing the data in table improves:.Increased clustering factor of the index causes degradation of queries performing Index Full Scan.Shrinking of the index coalesces the space freed on deleting the rows.Increased clustering factor of the index.Compacting of a fragmented table / index results in:.To improve the index clustering factor, data in the table needs to be reorganized so that rows in the table are in the same order on disk as the index keys. It is a misconception that rebuilding of index can improve its clustering factor. But performance of queries doing Index scans might degrade since the clustering factor of the index can increase as a result of row movement in the table. Shrinking a sparsely-populated segment improves the performance of Full Table Scans because there are fewer blocks below the HWM. Maintains the indexes so that they remain usable after the operation is complete.That free space is then deallocated and is made available for use by other segments. Adjusts the high water mark so that new free space is available above the HWM.Compacts the segment: Fragmented free space is consolidated by moving the rows to new locations to create empty blocks near the High Water Mark (HWM – a measurement of the maximum number of database blocks a segment has used so far).Oracle 11g introduced online segment shrink functionality to defragment and reclaim this space. Moreover, it can impact performance of the database as a higher number of sparsely-populated blocks need to be visited. This free space is wasted space as it is insufficient to hold new data. Defragmentation Can Degrade Query Performance - Simple TalkĪs data in tables is updated and / or deleted, pockets of empty space can be created, leading to fragmented free space.
