I'm running a Mysql server on my network (Mariadb 10.3.24), and have made a performance test with dbexpress and firedac on the same data, same machine and with no other users on the database. I'm using Delphi 10.1 and made no changes to the connection or query components setup.
My findings were (total number of records is 261.000):
Reading 100.000 records without a "where-clause"
Firedac : 184 sec
DBexpress: 93 sec
Reading 100.000 records with a where clause (indexed)
Firedac: 160 sec
DBexpress: 86 sec
All my programs are programmed with Firedac, is there a simple way to speed up Firedac, or do i need to switch to dbexpress to get a decent performance ?
My test (identical for dxexpress and firedac):
var start, slut : tdatetime;
n : integer;
begin
start := now;
listbox1.Items.Clear;
sqlq.Close;
sqlq.SQLConnection:=sqlcon;
sqlq.SQL.Clear;
sqlq.SQL.Add('select * from forsendelser where kundenummer="test" limit '+spinedit1.Text);
sqlq.Open;
while not sqlq.Eof do begin
listbox1.Items.Add(sqlq.FieldByName('stregkode').AsString );
sqlq.Next;
end;
sqlq.Close;
n :=SecondsBetween(Now, start);
edit2.Text:=n.ToString;
end;