1 2#pragma ident "%Z%%M% %I% %E% SMI" 3 4The SQL database used for ACD contains 113 tables and indices implemented 5in GDBM. The following are statistics on the sizes of keys and data 6within these tables and indices. 7 8Entries: 962080 9Size: 45573853 10Avg Size: 48 11Key Size: 11045299 12Avg Key Size: 12 13Max Key Size: 99 14 15 16 Size of key Cummulative 17 and data Instances Percentage 18------------ ---------- ----------- 19 0..8 266 0% 20 9..12 5485 0% 21 13..16 73633 8% 22 17..24 180918 27% 23 25..32 209823 48% 24 33..40 148995 64% 25 41..48 76304 72% 26 49..56 14346 73% 27 57..64 15725 75% 28 65..80 44916 80% 29 81..96 127815 93% 30 97..112 34769 96% 31 113..128 13314 98% 32 129..144 8098 99% 33 145..160 3355 99% 34 161..176 1159 99% 35 177..192 629 99% 36 193..208 221 99% 37 209..224 210 99% 38 225..240 129 99% 39 241..256 57 99% 40 257..288 496 99% 41 289..320 60 99% 42 321..352 37 99% 43 353..384 46 99% 44 385..416 22 99% 45 417..448 24 99% 46 449..480 26 99% 47 481..512 27 99% 48 513..1024 471 99% 49 1025..2048 389 99% 50 2049..4096 182 99% 51 4097..8192 74 99% 52 8193..16384 34 99% 5316385..32768 17 99% 5432769..65536 5 99% 5565537..131073 3 100% 56 57 58This information is gathered to help design the new built-in 59backend for sqlite 2.0. Note in particular that 99% of all 60database entries have a combined key and data size of less than 61144 bytes. So if a leaf node in the new database is able to 62store 144 bytes of combined key and data, only 1% of the leaves 63will require overflow pages. Furthermore, note that no key 64is larger than 99 bytes, so if the key will never be on an 65overflow page. 66 67The average combined size of key+data is 48. Add in 16 bytes of 68overhead for a total of 64. That means that a 1K page will 69store (on average) about 16 entries. 70