Was this helpful?
Notes:
This query is not needed for a B-tree index, in which the automatic inclusion of the tidp column in the key prevents overflow.
For B-tree tables with key compression selected, in the SELECT statement you can substitute an estimate of the average key size for key_width.
For keys_per_page calculations, see the chapter “Calculating Disk Space.”
The results of this query give an approximation of the amount of overflow at the leaf level, per key value. The query works by calculating the number of keys that fit on a page and dividing the total number of particular key incidents grouped by key by this value. For instance, if there are 100 occurrences of a particular key and 10 keys fit on each page, there are nine overflow pages at the leaf level.
Other tables can incur overflow pages for reasons other than duplicate keys; hence, overflow distribution can involve more than simply running a query.
Last modified date: 08/28/2024