Space Analyst Expert Guide

From DBArtisan
Jump to: navigation, search

Go Up to Space Analyst

IBM DB2 fragmentation can be broken down into two basic types:

  • External Fragmentation - this situation exists when indexes have a logical order, based on their key value, which does not match the actual physical order inside the database file that houses the index. When an ordered scan is performed on an index, I/O performance is enhanced when the physical order of the database pages matches the logical order of the index. This is because the disk head can scan in one direction instead of moving back and forth to obtain the needed information.
  • Internal Fragmentation - this situation exists when tables and indexes aren't utilizing space as efficiently as they should. The amount of wasted space in the database pages artificially inflates the size of the table or index and causes more I/O to be performed than would otherwise be needed if the object were compacted.

Keep in mind that fragmentation is not a performance factor at all once data reaches the IBM DB2 memory caches.

Topics