Re: DbExport space
Posted in 2000
Topics: Storage & Space Management, Migration, Import/Export & Data Conversion
En Joan Carles Cladellas va escriure el dia 8 Jun 2000, a les 10:24:
>
>
>
>
> Please, I need how to calculate the disk space needed for dbexport of one
> database. What's is the rule for calculate it??
>
> Thank`s in advance.
>
> Jcc.
>
>
Try:
Select tabnane,nrows*rowsize tab_long
from systables
where tabid > 99
union
select "zTotal data",sum(nrows*rowsize) tab_long
from systables
where tabid > 99
I hope this help.
---------------------------------------
Isidre PONS ROCA
BASE - Gesti' d'Ingressos Locals
(Diputacio de Tarragona)
Servei de Sistemes de Informacio
Av President Lluis Companys 12-C
43005 - Tarragona
SPAIN
Tel # +34 977 236731
Fax # +34 977 227302
http://www.altanet.org
ipons@dtgna.altanet.org
---------------------------------------
Hi,
Isidre PONS ROCA wrote:
>
> En Joan Carles Cladellas va escriure el dia 8 Jun 2000, a les 10:24:
> > Please, I need how to calculate the disk space needed for dbexport of one
> > database. What's is the rule for calculate it??
>
> Try:
> Select tabnane,nrows*rowsize tab_long
> from systables
> where tabid > 99
> union
> select "zTotal data",sum(nrows*rowsize) tab_long
> from systables
> where tabid > 99>
The problem in this calculation is, that you calculate with the
internal size
of the data types. Example:
Integer -> 4 Byte, but in an ascii file the size is up to 9 chars
date -> 4 Byte, but in an ascii file the size is up to 10 chars
You also have to add an extra byte (Field Seperator) to your maximum
length.
My maximum calculation for an dbexport for each table is:
FSUMLEN + Number of Fields + Number of Records
FSUMLEN = Maximum length of field after conversion to string
It seems to be a lot of work, but sometimes it is worth it.
Wile
"Wile E. Coyote" wrote: > FSUMLEN + Number of Fields + Number of Records sorry, I wanted to say FSUMLEN + Number of Fields * Number of Records Wile