Table size calculation.
Posted in 2003
Topics: Data Types & Schema Design
Hi, I would like to know about how to calculate the actual table size using the record details of the table 'systables'? We have around 30 ~ 40 fields in each and every table, so calculating the size of each and every field with the data types and summing up is a tedious job. Please suggest a shortcut to calculate the actual size of a table. Thanks in advance. Regards, Ravi Shankar N.
Perhaps
this scripts be useful for you. Calculate dbexport size aprox.
It's easy change it for a single table.
{SQL para calcular aproximadamente el tamaño de una exportacion de una BD
No tiene en cuenta que un numero se convierte a cadena al exportarlo y
ocupas mas, ademas tampoco tiene en cuenta los separadores}
select tabname, nrows*rowsize tab_long
from systables
where tabid > 99
unionselect "Total data",sum(nrows*rowsize) tab_long
from systables
where tabid > 99
N Ravishank.... escribió:
>Hi,
>I would like to know about how to calculate the actual table size using the
record details of the table 'systables'?
>We have around 30 ~ 40 fields in each and every table, so calculating the
size of each and every field with the data types and summing up is a tedious
job.
>
>Please suggest a shortcut to calculate the actual size of a table.
>
>Thanks in advance.
>
>Regards,
>Ravi Shankar N.
>
>
>
How about
select rowsize from systables where tabname = 'tbname' ;
Well it works on 7.31 FD3:-)
Colin B
> -----Original Message-----
> From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org]On
> Behalf Of N Ravishank....
> Sent: 02 September 2003 09:52
> To: ids@iiug.org
> Subject: Table size calculation. [1779]
>
>
>
> Hi,
> I would like to know about how to calculate the actual table
> size using the record details of the table 'systables'?
> We have around 30 ~ 40 fields in each and every table, so
> calculating the size of each and every field with the data
> types and summing up is a tedious job.
>
> Please suggest a shortcut to calculate the actual size of a table.
>
> Thanks in advance.
>
> Regards,
> Ravi Shankar N.
>