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
TIBCTable performance
Re: TIBCTable performance
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
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
Yes. It's called "SQL".Is there an IBC DBART API like the ADS or Paradox Engine API?
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.