Performance issue

Hello,

I have a performance problem on DBAdvGrid. I have a DB with a table with 1300 rows connected to DBAdvGrid. I set PageMode=True, DataSetType=dtNonSequenced and implemented the OnGetRecordCount event as the manual says but the navigation among the lines is slow.

To go from one record to the next it takes 1.0/1.3 seconds more than the time it takes if I remove DBAvdGrid and replace it with a normal DBGrid.

What else can I do in order to increase the speed of DBAdvGrid ?



Many thanks


Alberto

What is your exact implementation of ONGetRecordCount? Are you sure this is a performant implementation?

Hello,

 
I basically copy and paste the example taken from Page 6 of the manual:
 
procedure TForm1.DBAdvGrid1GetRecordCount(Sender: TObject;
begin
   Query2.SQL.Text := 'select Count(*) from DBTableName';
   Query2.Active := True; 
   Count := Query2.Fields[0].AsInteger;
   Query2.Active := False;
end
 
DBTableName=Table of my database
 
Many thanks
 
 
Alberto

We are not aware that executing a simple COUNT() is introducing a performance problem.
Can you try as a test to return a fixed number in OnGetRecordCount to see if the performance is affected by excluding or not excluding the use of the COUNT() in OnGetRecordCount?

Hello I did the test you mention but no luck.

Either you assign the database record number to Count in OnGetRecordCount or you use the example at page 6 of the manual there is no improvement.

If the information may help you, I use the DAC from Devart and I have applied all the performance improvement already on that side.

If you need further information in order to help me just let me know

Many thanks,

Alberto

It is unclear what is causing this. We can only assume this must be something in the dataset components from Devart which we unfortunately do not have installed here. Or can you reproduce this with a different dataset component as well?

Hello,

Unfortunately I have only Devart DACs for PostgreSQL