db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: storage estimation
Date Wed, 01 Nov 2006 19:08:41 GMT
S wrote:
> Hi, how do I estimate the average record length of a table. Actually, 
> I have a fast growing table and I need to understand the disk size 
> requirement of it. In Oracle, the all_tables table provides this 
> information.
I couldn't find this in the documentation but it still works - no 
promises that it will not be removed at some point - the following shows 
the space (pages and pagesize) for the tables and indexes of a table.  
Average records size can be computed by summing all the sizes (pages x 
pagesize), divide by the rows in the table.

 select * from NEW org.apache.derby.diag.SpaceTable('SYS','SYSTABLES') AS x;

CONGLOMERATENAME
        |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        
|NUMUNFILLEDPAGES    |PAGESIZE   |ESTIMSPACESAVING
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
SYSTABLES_INDEX1
        |1     |1                   |0                   
|1                   |4096       |0
SYSTABLES_INDEX2
        |1     |1                   |0                   
|1                   |4096       |0
SYSTABLES
        |0     |1                   |0                   
|1                   |4096       |0




Mime
View raw message