Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
Making the Database File Smaller
Previous  Top  Next



Absolute Database provides a possibility to configure many database file settings and particularly to decrease database file size.

To make the database file smaller, you can:

·Adjust database pages settings  
·Compress BLOB fields  
·Decrease limit of the maximum database connections  
·Remove empty space from the database file  


Adjusting database pages settings

Absolute Database allows you to optimize the database file size using PageSize and PageCountInExtent settings.
You can change these settings via
Absolute Database DBManager utility (...\AbsoluteDatabase\Ultils\Bin\DBManager.exe).
In application code, these settings could be change via properties of TABSDatabase component.

The admissible values range for
PageSize is 100..65536 bytes.
Set the lower values of
PageSize for small databases.

PageCountInExtent should be 1-4 for small databases, 4-8 for middle-size databases and 8-16 for large database files.

Set
PageSize and PageCountInExtent before creating a database file, or change these values via call to the ChangeDatabaseSettings method of TABSDatabase component.


Compressing BLOB fields

BLOB field values could be optionally compressed (See
Compressed BLOB Fields topic for more details).
This is very effective measure if you have a database with large texts, bitmap images and other binary data.


Decreasing limit of the maximum database connections

Another option allowing to decrease database file size is to set limit of
MaxConnections to the database as low as possible before database creating or via call to the ChangeDatabaseSettings method of TABSDatabase component.


Removing empty space from the database file

The database file consist of many data blocks or "pages". When the database data is deleted, the pages with deleted data inside the database file are marked as empty pages. When possible the empty pages are physically removed from the database file, but sometimes it couldn't be done immeditately.
In such cases you can compact the database file via
Absolute Database DBManager utility, or call to the CompactDatabase method of TABSDatabase component. (See Compacting Databases topic for more details).


        © 2003 - 2017 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Feb 19, 2017