/** Disk-Space Utilization Report For test2.db
Page size in bytes................................ 4096
Pages in the whole file (measured)................ 573
Pages in the whole file (calculated).............. 573
Pages that store data............................. 573 100.0%
Pages on the freelist (per header)................ 0 0.0%
Pages on the freelist (calculated)................ 0 0.0%
Pages of auto-vacuum overhead..................... 0 0.0%
Number of tables in the database.................. 2
Number of indices................................. 0
Number of defined indices......................... 0
Number of implied indices......................... 0
Size of the file in bytes......................... 2347008
Bytes of user payload stored...................... 603000 25.7%
*** Page counts for all tables with their indices *****************************
TEST.............................................. 572 99.83%
SQLITE_SCHEMA..................................... 1 0.17%
*** Page counts for all tables and indices separately *************************
TEST.............................................. 572 99.83%
SQLITE_SCHEMA..................................... 1 0.17%
*** All tables ****************************************************************
Percentage of total database...................... 100.0%
Number of entries................................. 501
Bytes of storage consumed......................... 2347008
Bytes of payload.................................. 603121 25.7%
Bytes of metadata................................. 6972 0.30%
Average payload per entry......................... 1203.83
Average unused bytes per entry.................... 3466.90
Average metadata per entry........................ 13.92
Average fanout.................................... 7.00
Maximum payload per entry......................... 1206
Entries that use overflow......................... 500 99.80%
Index pages used.................................. 9
Primary pages used................................ 64
Overflow pages used............................... 500
Total pages used.................................. 573
Unused bytes on index pages....................... 5694 15.4%
Unused bytes on primary pages..................... 43721 16.7%
Unused bytes on overflow pages.................... 1687500 82.4%
Unused bytes on all pages......................... 1736915 74.0%
*** Table SQLITE_SCHEMA *******************************************************
Percentage of total database...................... 0.17%
Number of entries................................. 1
Bytes of storage consumed......................... 4096
Bytes of payload.................................. 121 3.0%
Bytes of metadata................................. 112 2.7%
B-tree depth...................................... 1
Average payload per entry......................... 121.00
Average unused bytes per entry.................... 3863.00
Average metadata per entry........................ 112.00
Maximum payload per entry......................... 121
Entries that use overflow......................... 0 0.0%
Primary pages used................................ 1
Overflow pages used............................... 0
Total pages used.................................. 1
Unused bytes on primary pages..................... 3863 94.3%
Unused bytes on overflow pages.................... 0
Unused bytes on all pages......................... 3863 94.3%
*** Table TEST ****************************************************************
Percentage of total database...................... 99.83%
Number of entries................................. 500
Bytes of storage consumed......................... 2342912
Bytes of payload.................................. 603000 25.7%
Bytes of metadata................................. 6860 0.29%
B-tree depth...................................... 3
Average payload per entry......................... 1206.00
Average unused bytes per entry.................... 3466.10
Average metadata per entry........................ 13.72
Average fanout.................................... 7.00
Non-sequential pages.............................. 0 0.0%
Maximum payload per entry......................... 1206
Entries that use overflow......................... 500 100.0%
Index pages used.................................. 9
Primary pages used................................ 63
Overflow pages used............................... 500
Total pages used.................................. 572
Unused bytes on index pages....................... 5694 15.4%
Unused bytes on primary pages..................... 39858 15.4%
Unused bytes on overflow pages.................... 1687500 82.4%
Unused bytes on all pages......................... 1733052 74.0%
/** Disk-Space Utilization Report For test1.db
Page size in bytes................................ 4096
Pages in the whole file (measured)................ 169
Pages in the whole file (calculated).............. 169
Pages that store data............................. 169 100.0%
Pages on the freelist (per header)................ 0 0.0%
Pages on the freelist (calculated)................ 0 0.0%
Pages of auto-vacuum overhead..................... 0 0.0%
Number of tables in the database.................. 2
Number of indices................................. 0
Number of defined indices......................... 0
Number of implied indices......................... 0
Size of the file in bytes......................... 692224
Bytes of user payload stored...................... 603000 87.1%
*** Page counts for all tables with their indices *****************************
TEST.............................................. 168 99.41%
SQLITE_SCHEMA..................................... 1 0.59%
*** Page counts for all tables and indices separately *************************
TEST.............................................. 168 99.41%
SQLITE_SCHEMA..................................... 1 0.59%
*** All tables ****************************************************************
Percentage of total database...................... 100.0%
Number of entries................................. 501
Bytes of storage consumed......................... 692224
Bytes of payload.................................. 603080 87.1%
Bytes of metadata................................. 5619 0.81%
Average payload per entry......................... 1203.75
Average unused bytes per entry.................... 166.72
Average metadata per entry........................ 11.22
Average fanout.................................... 167.00
Maximum payload per entry......................... 1206
Entries that use overflow......................... 0 0.0%
Index pages used.................................. 1
Primary pages used................................ 168
Overflow pages used............................... 0
Total pages used.................................. 169
Unused bytes on index pages....................... 2798 68.3%
Unused bytes on primary pages..................... 80727 11.7%
Unused bytes on overflow pages.................... 0
Unused bytes on all pages......................... 83525 12.1%
*** Table SQLITE_SCHEMA *******************************************************
Percentage of total database...................... 0.59%
Number of entries................................. 1
Bytes of storage consumed......................... 4096
Bytes of payload.................................. 80 2.0%
Bytes of metadata................................. 112 2.7%
B-tree depth...................................... 1
Average payload per entry......................... 80.00
Average unused bytes per entry.................... 3904.00
Average metadata per entry........................ 112.00
Maximum payload per entry......................... 80
Entries that use overflow......................... 0 0.0%
Primary pages used................................ 1
Overflow pages used............................... 0
Total pages used.................................. 1
Unused bytes on primary pages..................... 3904 95.3%
Unused bytes on overflow pages.................... 0
Unused bytes on all pages......................... 3904 95.3%
*** Table TEST ****************************************************************
Percentage of total database...................... 99.41%
Number of entries................................. 500
Bytes of storage consumed......................... 688128
Bytes of payload.................................. 603000 87.6%
Bytes of metadata................................. 5507 0.80%
B-tree depth...................................... 2
Average payload per entry......................... 1206.00
Average unused bytes per entry.................... 159.24
Average metadata per entry........................ 11.01
Average fanout.................................... 167.00
Non-sequential pages.............................. 0 0.0%
Maximum payload per entry......................... 1206
Entries that use overflow......................... 0 0.0%
Index pages used.................................. 1
Primary pages used................................ 167
Overflow pages used............................... 0
Total pages used.................................. 168
Unused bytes on index pages....................... 2798 68.3%
Unused bytes on primary pages..................... 76823 11.2%
Unused bytes on overflow pages.................... 0
Unused bytes on all pages......................... 79621 11.6%
$ sqlite3 test2.db .dbinfo
database page size: 4096
write format: 1
read format: 1
reserved bytes: 0
file change counter: 501
database page count: 573
freelist page count: 0
schema cookie: 1
schema format: 4
default cache size: 0
autovacuum top root: 0
incremental vacuum: 0
text encoding: 1 (utf8)
user version: 0
application id: 0
software version: 3037002
number of tables: 1
number of indexes: 0
number of triggers: 0
number of views: 0
schema size: 100
data version 1
Тут либо внутри sqlite файла нерационально распределяется место между сегментом таблицы индекса либо сам индес в блоках постоянно сплиттится.