Page 1 of 1

Fetch data very slow

Posted: Thu 15 Jan 2009 11:25
by calou
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

Posted: Fri 30 Jan 2009 13:11
by Plash
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.

Posted: Wed 04 Feb 2009 08:22
by calou
Hi,

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

Regards