/** Disk-Space Utilization Report For tblGeoCountiesSoCal.sqlite3x Page size in bytes.................... 1024 Pages in the whole file (measured).... 528145 Pages in the whole file (calculated).. 528145 Pages that store data................. 528145 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 named indices............... 0 Automatically generated indices....... 0 Size of the file in bytes............. 540820480 Bytes of user payload stored.......... 459093891 84.9% *** Page counts for all tables with their indices ******************** TBLGEOCOUNTIESSOCAL................... 528144 100.000% SQLITE_MASTER......................... 1 0.0% *** All tables ******************************************************* Percentage of total database.......... 100.0% Number of entries..................... 1522002 Bytes of storage consumed............. 540820480 Bytes of payload...................... 459094597 84.9% Average payload per entry............. 301.64 Average unused bytes per entry........ 40.83 Average fanout........................ 99.00 Fragmentation......................... 3.0% Maximum payload per entry............. 706 Entries that use overflow............. 0 0.0% Index pages used...................... 5328 Primary pages used.................... 522817 Overflow pages used................... 0 Total pages used...................... 528145 Unused bytes on index pages........... 692459 12.7% Unused bytes on primary pages......... 61449873 11.5% Unused bytes on overflow pages........ 0 Unused bytes on all pages............. 62142332 11.5% *** Table SQLITE_MASTER ********************************************** Percentage of total database.......... 0.0% Number of entries..................... 1 Bytes of storage consumed............. 1024 Bytes of payload...................... 706 68.9% Average payload per entry............. 706.00 Average unused bytes per entry........ 205.00 Maximum payload per entry............. 706 Entries that use overflow............. 0 0.0% Primary pages used.................... 1 Overflow pages used................... 0 Total pages used...................... 1 Unused bytes on primary pages......... 205 20.0% Unused bytes on overflow pages........ 0 Unused bytes on all pages............. 205 20.0% *** Table TBLGEOCOUNTIESSOCAL **************************************** Percentage of total database.......... 100.000% Number of entries..................... 1522001 Bytes of storage consumed............. 540819456 Bytes of payload...................... 459093891 84.9% Average payload per entry............. 301.64 Average unused bytes per entry........ 40.83 Average fanout........................ 99.00 Fragmentation......................... 3.0% Maximum payload per entry............. 491 Entries that use overflow............. 0 0.0% Index pages used...................... 5328 Primary pages used.................... 522816 Overflow pages used................... 0 Total pages used...................... 528144 Unused bytes on index pages........... 692459 12.7% Unused bytes on primary pages......... 61449668 11.5% Unused bytes on overflow pages........ 0 Unused bytes on all pages............. 62142127 11.5% *** Definitions ****************************************************** Page size in bytes The number of bytes in a single page of the database file. Usually 1024. Number of pages in the whole file The number of 1024-byte pages that go into forming the complete database Pages that store data The number of pages that store data, either as primary B*Tree pages or as overflow pages. The number at the right is the data pages divided by the total number of pages in the file. Pages on the freelist The number of pages that are not currently in use but are reserved for future use. The percentage at the right is the number of freelist pages divided by the total number of pages in the file. Pages of auto-vacuum overhead The number of pages that store data used by the database to facilitate auto-vacuum. This is zero for databases that do not support auto-vacuum. Number of tables in the database The number of tables in the database, including the SQLITE_MASTER table used to store schema information. Number of indices The total number of indices in the database. Number of named indices The number of indices created using an explicit CREATE INDEX statement. Automatically generated indices The number of indices used to implement PRIMARY KEY or UNIQUE constraints on tables. Size of the file in bytes The total amount of disk space used by the entire database files. Bytes of user payload stored The total number of bytes of user payload stored in the database. The schema information in the SQLITE_MASTER table is not counted when computing this number. The percentage at the right shows the payload divided by the total file size. Percentage of total database The amount of the complete database file that is devoted to storing information described by this category. Number of entries The total number of B-Tree key/value pairs stored under this category. Bytes of storage consumed The total amount of disk space required to store all B-Tree entries under this category. The is the total number of pages used times the pages size. Bytes of payload The amount of payload stored under this category. Payload is the data part of table entries and the key part of index entries. The percentage at the right is the bytes of payload divided by the bytes of storage consumed. Average payload per entry The average amount of payload on each entry. This is just the bytes of payload divided by the number of entries. Average unused bytes per entry The average amount of free space remaining on all pages under this category on a per-entry basis. This is the number of unused bytes on all pages divided by the number of entries. Fragmentation The percentage of pages in the table or index that are not consecutive in the disk file. Many filesystems are optimized for sequential file access so smaller fragmentation numbers sometimes result in faster queries, especially for larger database files that do not fit in the disk cache. Maximum payload per entry The largest payload size of any entry. Entries that use overflow The number of entries that user one or more overflow pages. Total pages used This is the number of pages used to hold all information in the current category. This is the sum of index, primary, and overflow pages. Index pages used This is the number of pages in a table B-tree that hold only key (rowid) information and no data. Primary pages used This is the number of B-tree pages that hold both key and data. Overflow pages used The total number of overflow pages used for this category. Unused bytes on index pages The total number of bytes of unused space on all index pages. The percentage at the right is the number of unused bytes divided by the total number of bytes on index pages. Unused bytes on primary pages The total number of bytes of unused space on all primary pages. The percentage at the right is the number of unused bytes divided by the total number of bytes on primary pages. Unused bytes on overflow pages The total number of bytes of unused space on all overflow pages. The percentage at the right is the number of unused bytes divided by the total number of bytes on overflow pages. Unused bytes on all pages The total number of bytes of unused space on all primary and overflow pages. The percentage at the right is the number of unused bytes divided by the total number of bytes. ********************************************************************** The entire text of this report can be sourced into any SQL database engine for further analysis. All of the text above is an SQL comment. The data used to generate this report follows: */ BEGIN; CREATE TABLE space_used( name clob, -- Name of a table or index in the database file tblname clob, -- Name of associated table is_index boolean, -- TRUE if it is an index, false for a table nentry int, -- Number of entries in the BTree leaf_entries int, -- Number of leaf entries payload int, -- Total amount of data stored in this table or index ovfl_payload int, -- Total amount of data stored on overflow pages ovfl_cnt int, -- Number of entries that use overflow mx_payload int, -- Maximum payload size int_pages int, -- Number of interior pages used leaf_pages int, -- Number of leaf pages used ovfl_pages int, -- Number of overflow pages used int_unused int, -- Number of unused bytes on interior pages leaf_unused int, -- Number of unused bytes on primary pages ovfl_unused int, -- Number of unused bytes on overflow pages gap_cnt int, -- Number of gaps in the page layout compressed_size int -- Total bytes stored on disk ); INSERT INTO space_used VALUES('sqlite_master','sqlite_master',0,1,1,706,0,0,706,0,1,0,0,205,0,0,1024); INSERT INTO space_used VALUES('tblGeoCountiesSoCal','tblGeoCountiesSoCal',0,2044816,1522001,459093891,0,0,491,5328,522816,0,692459,61449668,0,15874,540819456); COMMIT;