|
The BDE (Borland Database Engine) stands as an intermediate layer between your
C++ Builder program's data components and the actual DBMS (DataBase Management
System - for instance Access or dBase). It offers special services, in some
cases providing services not normally provided by the underlying DBMS (such
as transactions), and in other cases providing services which cross DBMS boundaries,
such as heterogenous joins (SELECTs which join two or more tables, each from
a different database or even a different DBMS).
For, small tables, BDE performance is generally good. However, when your database
tables become larger, you may need to change certain BDE parameters, especially
when you are iterating through all of the rows in a table.
On my system, a Pentium 120 with 32 Mb RAM, the following settings worked well
for a 8,000 row local dBase table, with performance results discussed below.
The default settings worked fine for tables of 500 rows.
BDE parameters are set in BDECFG32.EXE. In BDE 3, go to the System page. Change
the following:
| MINBUFSIZE |
to 2048 |
| MAXBUFSIZE |
to 8152 |
| MAXFILEHANDLES |
96 |
| LOWMEMORYUSAGELIMIT |
64 |
| SHAREDMEMSIZE |
2048 |
With these settings, my test program scanned 8,000 rows (performing a field
access on each row and updating a screen row count in a TLabel) in about 25
seconds, a performance of 19,440 rows per minute.
The following is the test program:
void __fastcall TBDETestForm::LoopButtonClick(TObject *Sender)
{
if (TestDatabase->LargeTable->FindFirst())
{
int Index = 1;
do
{
AnsiString ID
= TestDatabase->LargeTable->FieldByName("ID")->AsString;
RowDisplay->Caption
= Index++;
ColumnDisplay->Caption
= ID;
Application->ProcessMessages();
}
while (TestDatabase->LargeTable->FindNext());
};
} |
|
|