Consultor Eletrônico



Kbase P8202: How to determine amount of disk space used for a Database
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/31/2005
Status: Verified

GOAL:

How much disk space is required for a database?

GOAL:

Formulas for Calculating Database Size?

FIX:

Formulas for Calculating Database Size:


Size Formula
----- --------
Database size schema size + data table size + index size
Schema size Typically, between 1 and 100 MB (megabytes) **
Data table size Sum of individual table sizes
Individual table size number of records x field storage x 1.5
Index size Sum of individual index sizes
Individual index size number of records in the table being indexed x
(7 + number of fields index +field storage) x 2
Note: To determine the schema size, load the schema into an empty database and check the size of your database - this is the size of your schema.


Formulas used to calculate the field storage values (in bytes) for different data types:

4GL Data Type Value Field
Storage in Bytes(SQL-92 Equivalent)

CHARACTER 1 + number of characters, excluding trailing blanks. If the number of characters is greater than 240, add 3 to the (VARCHAR) number of characters instead of 1. Multi-byte characters will be 20 + 3.

DATE 3
(DATE)

DECIMAL zero 1
(DECIMAL or nonzero 2 + (number of significant digits + 1) / 2
NUMERIC)

INTEGER zero 1
(INTEGER) 127 2
32767 3
8 million 4
2 billion 5

LOGICAL false 1
(BIT) true 2