Subject Re: [firebird-support] Re: Plan explanation needed for query
Author Ann W. Harrison
Svein Erling Tysvær wrote:
>
> admittedly I do not understand 'fill distribution'

The fill distribution indicates how much space is used. On tables, it's
the percent of the space on each data page that used for the page
header, page index, and data. On indexes, it's the percent of space in
each index page that contains index information.

For example, this describes a table

Average record length: 83.81, total records: 308272
Average version length: 0.00, total versions: 0, max versions: 0
Data pages: 9499, data page slots: 9499, average fill: 80%
Fill distribution:

0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 3584
80 - 99% = 5914

The average record length is the average length of the compressed
records. It doesn't count the record header or other overhead. Total
records is the number of primary records - not necessarily the count
that any particular user would see, since some of them may be deleted.
This table has no back versions. Of the 9499 data pages, most (5914) are
almost full 80 - 99%. Another chunk are 60-79% full - possibly because
records have been deleted - possibly just due to differences in
compression. One page is only slightly used, possibly because it was
the last one allocated and hasn't had must stuck there yet.

If you look at the fill distribution for indexes, you'll notice that
they are much more dense if you've recently done a backup/restore or if
you've deactivated/reactivated indexes - the difference will be less in
Firebird 2.

Regards,


Ann