4
In Oracle, when we want to know how much a table occupies disk we can make a query to the dictionary dba_segments
.
SELECT segment_name, segment_type, bytes/1024/1024 MB
FROM dba_segments
WHERE segment_type='TABLE' and segment_name='<nome-tabela>';
In the Sqlite database how to know exactly how much a table is occupying on the disk? Is there a dictionary? I have seen bad matrix calculation solutions to return data that I would not like to use that gives a flawed 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
fact! I wanted to work with a calculation for caching a specific solution, but I changed the way I think about the ;-) architecture Thank you so much for the collaboration!
– Mateus