Same code use ADOQuery in 2 seconds.
Code: Select all
procedure TForm3.Button2Click(Sender: TObject);
var A : TUniConnection;
begin
inherited;
with UniQuery1 do
try
Close;
SQL.Clear;
// tblA have one Record, field image1 and image2 is blob field and stored picture about 1M size
SQL.Add('select Image1, Image2 from tblA');
Open;
Close;
SQL.Clear;
// tblB have 20000 record with blob field, but blob field is null
// it will take 8-10 seconds
SQL.Add('SELECT * FROM tblB ');
OPen;
finally
end;
end;not select a blob field first, the performance is normal.
Who know the reason?
Code: Select all
procedure TForm3.Button2Click(Sender: TObject);
var A : TUniConnection;
begin
inherited;
with UniQuery1 do
try
Close;
SQL.Clear;
// tblB have 20000 record with blob field, but blob field is null
// it will take 2-3 seconds
SQL.Add('SELECT * FROM tblB ');
OPen;
finally
end;
end;