TIBCTable performance

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ArizmendiTeam
Posts: 10
Joined: Fri 13 Jul 2018 18:36

TIBCTable performance

Post by ArizmendiTeam » Thu 15 Nov 2018 21:57

I am migrating a console application programmed with C ++ Builder. The current application uses Advantage Database Server (ADS) and its API. The new application uses Interbase 2017 and the TICBTable components.
I copy below a small example of how I am implementing it:

#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#pragma argsused
#include <stdio.h>
#include "DBAccess.hpp"
#include "IBC.hpp"
#include <Data.DB.hpp>

int _tmain(int argc, _TCHAR* argv[])
{
TIBCConnection *IBCConnection = new TIBCConnection(NULL);
IBCConnection->Server = "localhost";
IBCConnection->AutoCommit = true;
IBCConnection->Username = "sysdba";
IBCConnection->Password = "masterkey";
IBCConnection->Database = "C:\\SirFullWeb\\E001076\\DbHaberes\\DbHaberes2.IB";
IBCConnection->Connect();
TIBCTable *IBCTable = new TIBCTable(NULL);
IBCTable->Connection = IBCConnection;
IBCTable->TableName = "Elresumen";
IBCTable->AutoCommit = true;
IBCTable->Active = true;
TStringList * Keys = new TStringList;
IBCTable->GetKeyFieldNames(Keys);
Keys->Delimiter = ';';
IBCTable->IndexFieldNames = Keys->DelimitedText;
IBCTable->First();
while (!IBCTable->Eof) {
printf("Empresa: %d Empleado: %d Anio: %d Mes: %d Liquidacion: %s Agrupamiento %s \n",IBCTable->Fields->Fields[0]->AsInteger,IBCTable->Fields->Fields[1]->AsInteger,IBCTable->Fields->Fields[2]->AsInteger,IBCTable->Fields->Fields[3]->AsInteger,AnsiString(IBCTable->Fields->Fields[4]->AsString).c_str(),AnsiString(IBCTable->Fields->Fields[5]->AsString).c_str());
IBCTable->Next();
}
IBCTable->Free();
IBCConnection->Disconnect();
IBCConnection->Free();
return 0;
}

How can I increase the performance? Is there an IBC DBART API like the ADS or Paradox Engine API?

The application uses LOCATE and Next () repeatedly and the performance with Interbase is much slower than with ADS.

Regars

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TIBCTable performance

Post by ViktorV » Fri 16 Nov 2018 14:08

It is not quite correct to compare performance when working with different DBMSs, since many factors affect performance: the architecture and configuration of the DBMS, processors architecture, network organization (LAN/WAN) etc.
You can find additional information about increasing performance when using our components to work with Firebird on our website: https://www.devart.com/ibdac/docs/index ... rmance.htm

frickler
Posts: 37
Joined: Wed 04 Apr 2018 08:30

Re: TIBCTable performance

Post by frickler » Mon 19 Nov 2018 10:22

Is there an IBC DBART API like the ADS or Paradox Engine API?
Yes. It's called "SQL".

Interbase (and other SQL databases like MSSQL, MySQL, PostgreSQl...) does not work well with navigational access like Paradox oder DBF. Using IBDAC navigational access is only emulated, thus slow.

It you really need to navigate through tables like in Paradox instead of using SQL for database tasks, you should look at databases like NexusDB or DBISAM/ElevateDB. They will provide navigational access and a database server.

Post Reply