17c478bd9Sstevel@tonic-gateThe SQL database used for ACD contains 113 tables and indices implemented 27c478bd9Sstevel@tonic-gatein GDBM. The following are statistics on the sizes of keys and data 37c478bd9Sstevel@tonic-gatewithin these tables and indices. 47c478bd9Sstevel@tonic-gate 57c478bd9Sstevel@tonic-gateEntries: 962080 67c478bd9Sstevel@tonic-gateSize: 45573853 77c478bd9Sstevel@tonic-gateAvg Size: 48 87c478bd9Sstevel@tonic-gateKey Size: 11045299 97c478bd9Sstevel@tonic-gateAvg Key Size: 12 107c478bd9Sstevel@tonic-gateMax Key Size: 99 117c478bd9Sstevel@tonic-gate 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gate Size of key Cummulative 147c478bd9Sstevel@tonic-gate and data Instances Percentage 157c478bd9Sstevel@tonic-gate------------ ---------- ----------- 167c478bd9Sstevel@tonic-gate 0..8 266 0% 177c478bd9Sstevel@tonic-gate 9..12 5485 0% 187c478bd9Sstevel@tonic-gate 13..16 73633 8% 197c478bd9Sstevel@tonic-gate 17..24 180918 27% 207c478bd9Sstevel@tonic-gate 25..32 209823 48% 217c478bd9Sstevel@tonic-gate 33..40 148995 64% 227c478bd9Sstevel@tonic-gate 41..48 76304 72% 237c478bd9Sstevel@tonic-gate 49..56 14346 73% 247c478bd9Sstevel@tonic-gate 57..64 15725 75% 257c478bd9Sstevel@tonic-gate 65..80 44916 80% 267c478bd9Sstevel@tonic-gate 81..96 127815 93% 277c478bd9Sstevel@tonic-gate 97..112 34769 96% 287c478bd9Sstevel@tonic-gate 113..128 13314 98% 297c478bd9Sstevel@tonic-gate 129..144 8098 99% 307c478bd9Sstevel@tonic-gate 145..160 3355 99% 317c478bd9Sstevel@tonic-gate 161..176 1159 99% 327c478bd9Sstevel@tonic-gate 177..192 629 99% 337c478bd9Sstevel@tonic-gate 193..208 221 99% 347c478bd9Sstevel@tonic-gate 209..224 210 99% 357c478bd9Sstevel@tonic-gate 225..240 129 99% 367c478bd9Sstevel@tonic-gate 241..256 57 99% 377c478bd9Sstevel@tonic-gate 257..288 496 99% 387c478bd9Sstevel@tonic-gate 289..320 60 99% 397c478bd9Sstevel@tonic-gate 321..352 37 99% 407c478bd9Sstevel@tonic-gate 353..384 46 99% 417c478bd9Sstevel@tonic-gate 385..416 22 99% 427c478bd9Sstevel@tonic-gate 417..448 24 99% 437c478bd9Sstevel@tonic-gate 449..480 26 99% 447c478bd9Sstevel@tonic-gate 481..512 27 99% 457c478bd9Sstevel@tonic-gate 513..1024 471 99% 467c478bd9Sstevel@tonic-gate 1025..2048 389 99% 477c478bd9Sstevel@tonic-gate 2049..4096 182 99% 487c478bd9Sstevel@tonic-gate 4097..8192 74 99% 497c478bd9Sstevel@tonic-gate 8193..16384 34 99% 507c478bd9Sstevel@tonic-gate16385..32768 17 99% 517c478bd9Sstevel@tonic-gate32769..65536 5 99% 527c478bd9Sstevel@tonic-gate65537..131073 3 100% 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gateThis information is gathered to help design the new built-in 567c478bd9Sstevel@tonic-gatebackend for sqlite 2.0. Note in particular that 99% of all 577c478bd9Sstevel@tonic-gatedatabase entries have a combined key and data size of less than 587c478bd9Sstevel@tonic-gate144 bytes. So if a leaf node in the new database is able to 597c478bd9Sstevel@tonic-gatestore 144 bytes of combined key and data, only 1% of the leaves 607c478bd9Sstevel@tonic-gatewill require overflow pages. Furthermore, note that no key 617c478bd9Sstevel@tonic-gateis larger than 99 bytes, so if the key will never be on an 627c478bd9Sstevel@tonic-gateoverflow page. 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gateThe average combined size of key+data is 48. Add in 16 bytes of 657c478bd9Sstevel@tonic-gateoverhead for a total of 64. That means that a 1K page will 667c478bd9Sstevel@tonic-gatestore (on average) about 16 entries. 67