Thank you very much!

/** Disk-Space Utilization Report For junk.db3

Page size in bytes................................ 1024      
Pages in the whole file (measured)................ 27606264  
Pages in the whole file (calculated).............. 24264026  
Pages that store data............................. 24261882    87.9% 
Pages on the freelist (per header)................ 2144         0.008% 
Pages on the freelist (calculated)................ 3344382     12.1% 
Pages of auto-vacuum overhead..................... 0            0.0% 
Number of tables in the database.................. 5         
Number of indices................................. 1         
Number of defined indices......................... 1         
Number of implied indices......................... 0         
Size of the file in bytes......................... 28268814336
Bytes of user payload stored...................... 18312217251  64.8% 

*** Page counts for all tables with their indices
*****************************

MYTABLE........................................... 24260587    87.9% 
PARTS............................................. 1292         0.005% 
QUERY............................................. 1            0.0% 
SQLITE_MASTER..................................... 1            0.0% 
SQLITE_SEQUENCE................................... 1            0.0% 

*** Page counts for all tables and indices separately
*************************

MYTABLE........................................... 24260587    87.9% 
PARTS............................................. 1116         0.004% 
MANUF............................................. 176          0.0% 
QUERY............................................. 1            0.0% 
SQLITE_MASTER..................................... 1            0.0% 
SQLITE_SEQUENCE................................... 1            0.0% 

*** All tables and indices
****************************************************

Percentage of total database......................  87.9%    
Number of entries................................. 704297145 
Bytes of storage consumed......................... 24844167168
Bytes of payload.................................. 18312362684  73.7% 
Average payload per entry......................... 26.00     
Average unused bytes per entry.................... 1.02      
Average fanout.................................... 84.00     
Maximum payload per entry......................... 426       
Entries that use overflow......................... 0            0.0% 
Index pages used.................................. 285997    
Primary pages used................................ 23975885  
Overflow pages used............................... 0         
Total pages used.................................. 24261882  
Unused bytes on index pages....................... 34713267    11.9% 
Unused bytes on primary pages..................... 683387034    2.8% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 718100301    2.9% 

*** All tables
****************************************************************

Percentage of total database......................  87.9%    
Number of entries................................. 704287145 
Bytes of storage consumed......................... 24843986944
Bytes of payload.................................. 18312217804  73.7% 
Average payload per entry......................... 26.00     
Average unused bytes per entry.................... 1.02      
Average fanout.................................... 84.00     
Maximum payload per entry......................... 426       
Entries that use overflow......................... 0            0.0% 
Index pages used.................................. 285997    
Primary pages used................................ 23975709  
Overflow pages used............................... 0         
Total pages used.................................. 24261706  
Unused bytes on index pages....................... 34713267    11.9% 
Unused bytes on primary pages..................... 683383798    2.8% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 718097065    2.9% 

*** All indices
***************************************************************

Percentage of total database......................   0.0%    
Number of entries................................. 10000     
Bytes of storage consumed......................... 180224    
Bytes of payload.................................. 144880      80.4% 
Average payload per entry......................... 14.49     
Average unused bytes per entry.................... 0.32      
Maximum payload per entry......................... 35        
Entries that use overflow......................... 0            0.0% 
Primary pages used................................ 176       
Overflow pages used............................... 0         
Total pages used.................................. 176       
Unused bytes on primary pages..................... 3236         1.8% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 3236         1.8% 

*** Table MYTABLE
*************************************************************

Percentage of total database......................  87.9%    
Number of entries................................. 704277138 
Bytes of storage consumed......................... 24842841088
Bytes of payload.................................. 18311205588  73.7% 
Average payload per entry......................... 26.00     
Average unused bytes per entry.................... 1.02      
Average fanout.................................... 84.00     
Non-sequential pages.............................. 12           0.0% 
Maximum payload per entry......................... 26        
Entries that use overflow......................... 0            0.0% 
Index pages used.................................. 285986    
Primary pages used................................ 23974601  
Overflow pages used............................... 0         
Total pages used.................................. 24260587  
Unused bytes on index pages....................... 34710955    11.9% 
Unused bytes on primary pages..................... 683321040    2.8% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 718031995    2.9% 

*** Table QUERY
***************************************************************

Percentage of total database......................   0.0%    
Number of entries................................. 1         
Bytes of storage consumed......................... 1024      
Bytes of payload.................................. 426         41.6% 
Average payload per entry......................... 426.00    
Average unused bytes per entry.................... 585.00    
Maximum payload per entry......................... 426       
Entries that use overflow......................... 0            0.0% 
Primary pages used................................ 1         
Overflow pages used............................... 0         
Total pages used.................................. 1         
Unused bytes on primary pages..................... 585         57.1% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 585         57.1% 

*** Table PARTS and all its indices
*******************************************

Percentage of total database......................   0.005%  
Number of entries................................. 20000     
Bytes of storage consumed......................... 1323008   
Bytes of payload.................................. 1156117     87.4% 
Average payload per entry......................... 57.81     
Average unused bytes per entry.................... 3.32      
Average fanout.................................... 101.00    
Maximum payload per entry......................... 156       
Entries that use overflow......................... 0            0.0% 
Index pages used.................................. 11        
Primary pages used................................ 1281      
Overflow pages used............................... 0         
Total pages used.................................. 1292      
Unused bytes on index pages....................... 2312        20.5% 
Unused bytes on primary pages..................... 64056        4.9% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 66368        5.0% 

*** Table PARTS w/o any indices
***********************************************

Percentage of total database......................   0.004%  
Number of entries................................. 10000     
Bytes of storage consumed......................... 1142784   
Bytes of payload.................................. 1011237     88.5% 
Average payload per entry......................... 101.12    
Average unused bytes per entry.................... 6.31      
Average fanout.................................... 101.00    
Non-sequential pages.............................. 1            0.090% 
Maximum payload per entry......................... 156       
Entries that use overflow......................... 0            0.0% 
Index pages used.................................. 11        
Primary pages used................................ 1105      
Overflow pages used............................... 0         
Total pages used.................................. 1116      
Unused bytes on index pages....................... 2312        20.5% 
Unused bytes on primary pages..................... 60820        5.4% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 63132        5.5% 

*** Index MANUF of table PARTS
************************************************

Percentage of total database......................   0.0%    
Number of entries................................. 10000     
Bytes of storage consumed......................... 180224    
Bytes of payload.................................. 144880      80.4% 
Average payload per entry......................... 14.49     
Average unused bytes per entry.................... 0.32      
Non-sequential pages.............................. 1            0.57% 
Maximum payload per entry......................... 35        
Entries that use overflow......................... 0            0.0% 
Primary pages used................................ 176       
Overflow pages used............................... 0         
Total pages used.................................. 176       
Unused bytes on primary pages..................... 3236         1.8% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 3236         1.8% 

*** Table SQLITE_MASTER
*******************************************************

Percentage of total database......................   0.0%    
Number of entries................................. 6         
Bytes of storage consumed......................... 1024      
Bytes of payload.................................. 553         54.0% 
Average payload per entry......................... 92.17     
Average unused bytes per entry.................... 56.17     
Maximum payload per entry......................... 225       
Entries that use overflow......................... 0            0.0% 
Primary pages used................................ 1         
Overflow pages used............................... 0         
Total pages used.................................. 1         
Unused bytes on primary pages..................... 337         32.9% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 337         32.9% 

*** Table SQLITE_SEQUENCE
*****************************************************

Percentage of total database......................   0.0%    
Number of entries................................. 0         
Bytes of storage consumed......................... 1024      
Bytes of payload.................................. 0            0.0% 
Average payload per entry......................... 0.0       
Average unused bytes per entry.................... 0.0       
Maximum payload per entry......................... 0         
Entries that use overflow......................... 0         
Primary pages used................................ 1         
Overflow pages used............................... 0         
Total pages used.................................. 1         
Unused bytes on primary pages..................... 1016        99.22% 
Unused bytes on overflow pages.................... 0         
Unused bytes on all pages......................... 1016        99.22% 

*** 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 defined indices

    The number of indices created using an explicit CREATE INDEX statement.

Number of implied 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.

Non-sequential pages

    The number of pages in the table or index that are out of sequence.
    Many filesystems are optimized for sequential file access so a small
    number of non-sequential pages might result in faster queries,
    especially for larger database files that do not fit in the disk cache.
    Note that after running VACUUM, the root page of each table or index is
    at the beginning of the database file and all other pages are in a
    separate part of the database file, resulting in a single non-
    sequential page.

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,6,6,553,0,0,225,0,1,0,0,337,0,0,1024);
INSERT INTO space_used
VALUES('parts','parts',0,11104,10000,1011237,0,0,156,11,1105,0,2312,60820,0,1,1142784);
INSERT INTO space_used
VALUES('sqlite_sequence','sqlite_sequence',0,0,0,0,0,0,0,0,1,0,0,1016,0,0,1024);
INSERT INTO space_used
VALUES('Query','Query',0,1,1,426,0,0,426,0,1,0,0,585,0,0,1024);
INSERT INTO space_used
VALUES('MANUF','parts',1,10000,10000,144880,0,0,35,0,176,0,0,3236,0,1,180224);
INSERT INTO space_used
VALUES('MyTable','MyTable',0,728251738,704277138,18311205588,0,0,26,285986,23974601,0,34710955,683321040,0,12,24842841088);
COMMIT;




-----
May
--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Database-corrupted-28-billion-bytes-tp80048p80080.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to