Page 1 of 1

TIBCTable performance

Posted: Thu 15 Nov 2018 21:57
by ArizmendiTeam
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

Re: TIBCTable performance

Posted: Fri 16 Nov 2018 14:08
by ViktorV
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

Re: TIBCTable performance

Posted: Mon 19 Nov 2018 10:22
by frickler
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.