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