In Oracle, when we want to know how much a table occupies disk we can query the dba_segments
dictionary.
SELECT segment_name, segment_type, bytes/1024/1024 MB
FROM dba_segments
WHERE segment_type='TABLE' and segment_name='<nome-tabela>';
In SQLite database how do you know how much a table is occupying exactly on disk? Is there a dictionary? I've already seen awful matrix-computing solutions to return the data I would not want to use that gives a hard-hitting calculation for obvious reasons (overestimated):
SELECT COUNT(*) * -- The number of rows in the table
( 24 + -- The length of all 4 byte int columns
12 + -- The length of all 8 byte int columns
128 ) -- The estimate of the average length of all string columns
FROM MyTable