Subject | Database-Size and average fill of datapages |
---|---|
Author | Josef Gschwendtner |
Post date | 2004-12-07T11:10:29Z |
Hi,
I do some testing trying to understand the size of a database (pagesize
4096).
Some results I don't understand and I hope somebody can give me the
insight.
I have a (test-) database with one small table and inserted 1 Mio
record.
After doing this the statistics are as follows:
MD (128)
Primary pointer page: 149, Index root page: 150
Data pages: 14264, data page slots: 14264, average fill: 58%
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 14263
60 - 79% = 0
80 - 99% = 0
Index PK_MD (0)
Depth: 3, leaf buckets: 3355, nodes: 1000005
Average data length: 1.00, total dup: 5, max dup: 1
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 3194
60 - 79% = 0
80 - 99% = 161
I calculated, that 1 Mio. records within 14264 pages results in about 70
record on one page.
========================================================================
========
Why is the average fill for data-pages not higher then 58%??? Can this
be tuned?
========================================================================
========
After backup/restore the numbers for datapages did not change, but all
index-pages have an average-fill of 89%-99% (1731 pages).
It seems that double precision fields with a NULL-value do not need the
space which is needed for non-NULL-values.
What is stored for a numeric-field with value NULL?
What is stored for a (var)char with value NULL?
Thank you for sharing your insight.
Josef Gschwendtner
I do some testing trying to understand the size of a database (pagesize
4096).
Some results I don't understand and I hope somebody can give me the
insight.
I have a (test-) database with one small table and inserted 1 Mio
record.
After doing this the statistics are as follows:
MD (128)
Primary pointer page: 149, Index root page: 150
Data pages: 14264, data page slots: 14264, average fill: 58%
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 14263
60 - 79% = 0
80 - 99% = 0
Index PK_MD (0)
Depth: 3, leaf buckets: 3355, nodes: 1000005
Average data length: 1.00, total dup: 5, max dup: 1
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 3194
60 - 79% = 0
80 - 99% = 161
I calculated, that 1 Mio. records within 14264 pages results in about 70
record on one page.
========================================================================
========
Why is the average fill for data-pages not higher then 58%??? Can this
be tuned?
========================================================================
========
After backup/restore the numbers for datapages did not change, but all
index-pages have an average-fill of 89%-99% (1731 pages).
It seems that double precision fields with a NULL-value do not need the
space which is needed for non-NULL-values.
What is stored for a numeric-field with value NULL?
What is stored for a (var)char with value NULL?
Thank you for sharing your insight.
Josef Gschwendtner