My question arose based on a test that I am doing, which consists of the following:
Code: Select all
var i: Integer; dTime, dtStart: TDateTime;
for i:= 0 to 1000 do begin
UniQuery1.SQL.Add('SELECT * FROM TEST_TABLE');
UniQuery1.SQL.Add('WHERE COL1 >= ''2018-08-20 00:00:00.000'' AND COL2 = :pCOL2');
UniQuery1.SQL.Add('ORDER BY COL3 DESC');
UniQuery1.Params.CreateParam(ftString, 'pCOL2', ptInput).AsString:= 'F';
While not UniQuery1.Eof do begin
ShowMessage(FormatDateTime('hh:mm:ss.zzz', Start-Now));// 10.5 seconds
The duration of the previous test is 10.5 seconds. Exactly that same test I did it with a TFDQuery,
and his duarion was 2.5 seconds.
The first difference I found is that the connection of the TFDConnection
it appears to me as ODBC and that of TUniConnection as OLEDB.
I'm interested in the UniDAC components. Any recommendations to configure the TUniQuery?
The TFDQuery configuration is as follows: