Fetch data very slow

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
calou
Posts: 116
Joined: Tue 27 May 2008 12:46

Fetch data very slow

Post by calou » Thu 15 Jan 2009 11:25

Hello,

I use this syntax :

Code: Select all

sql:=Select * from DATA_10MIN where (NOM_PROJET='EPE' and  REF_TURBINE_VALOREM in ( 'T1','T2','T3','T4','T5','T6') and DATE_HEURE between :DATE_DEBUT and :DATE_FIN)
frmMain.IbcQryRd.SQL.Text:=sql;
//récupération des dates
  frmMain.IBCQryRd.ParamByName('DATE_DEBUT').AsDate:=frmMain.DtTmPckDeb.Date;
  frmMain.IBCQryRd.ParamByName('DATE_FIN').AsDate:=frmMain.DtTmPckFin.Date;
  frmMain.IbcQryRd.Open;
while not frmMain.IbcQryRd.eof
  write data in string grid
This select fetch 300 000 records
If i see the speed of the lan it is at 1% of 100M and of course it is very slow.

If i do the same select on a database soft (database workbench) and retrieve data on a grid, the lan speed is 65%!!!!

How could the difference be explained?

Regards

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 30 Jan 2009 13:11

Maybe, much time is lost when adding data to the TStringGrid component. Please try to execute the same code without writing data. Also try to set the UniDirectional property of TIBCQuery to True.

calou
Posts: 116
Joined: Tue 27 May 2008 12:46

Post by calou » Wed 04 Feb 2009 08:22

Hi,

It seems that you are right when you are talking about the stringGrid

Regards

Post Reply