Are FireDAC data access components slower than dbExpress?

I migrated the database access components in our Delphi XE5 application from DBExpress to FireDAC.

So when I was using TSQLConnection / TSQLDataSet, now I am using TFDConnection / TFDQuery.

My observation so far is that it takes about twice as long to return 125,000 rows of data (via a simple SELECT * query) from our SQL Server 2014 database in the cloud to the client application using FireDAC components and using DBExpress components.

When I run the same test on the same table, with both the application and the SQL server on the same machine, the FireDAC components are slightly faster.

Is this normal, or is there something I might be doing wrong? I am not very familiar with FireDAC components, so any pointers would be very helpful.

DBExpress code:

SQL_dataset:=TSQLDataSet;

....

SQL_dataset.CommandType:=ctQuery; 
SQL_dataset.CommandText:='SELECT * FROM TABLE';

SQL_dataset.Open;

If SQL_dataset.IsEmpty=False then 
begin 
  SQL_dataset.First;

  While not SQL_dataset.Eof do 
  begin
    { RETURN THE RECORDS }
    SQL_dataset.Next;  
  end;
end;

      

FireDAC code:

SQL_query:=TFDQuery;

...

SQL_query.SQL.Text:='SELECT * FROM TABLE';
SQL_query.Open;

      

... then according to the DBExpress code.

Based on online research, I've tried variations of the following, but nothing seems to matter much:

SQL_query.ResourceOptions.ParamCreate  :=False;
SQL_query.ResourceOptions.ParamExpand  :=False;
SQL_query.ResourceOptions.MacroCreate  :=False;
SQL_query.ResourceOptions.EscapeExpand :=False;
SQL_query.ResourceOptions.DirectExecute:=True;
SQL_query.FetchOptions.CursorKind      :=ckDefault;
SQL_query.FetchOptions.Mode            :=fmOnDemand;
SQL_query.FetchOptions.RowsetSize      :=1000;
SQL_query.FetchOptions.Unidirectional  :=True;
SQL_query.FetchOptions.Items           :=
                                      SQL_query.FetchOptions.Items-[fiMeta];
SQL_query.UpdateOptions.ReadOnly       :=True;
SQL_query.DisableControls;

      

Any advice or comments would be much appreciated.

+3
sql-server delphi delphi-xe dbexpress firedac


source to share


No one has answered this question yet

Check out similar questions:

4
How can I copy a database table to another database matching using TSQLConnection / dbExpress?
2
Firedac ODBC and Ingres Database - "The API function cannot be called in its current state"
2
Automatic detection of required TFDQuery fields in Delphi
1
TStringGrid show (bcd) in delphi live binding
1
Unable to query cursor if executing SQL query with return value
1
Updating DBExpress Data
1
The FireDAC equivalent of the DBExpress portfolio model
0
How to load image from Firebird database as Blob to TImage in Delphi using FireDAC?
0
Change the SQL string of the FireDAC query from DataSnap client
0
How to override registry path for fireDAC or DBExpress vendorLib



All Articles
Loading...
X
Show
Funny
Dev
Pics