[Lazarus] db grid/dataset components that only load currently visible records?

Luca Olivetti luca at wetron.es
Thu Feb 23 11:02:51 CET 2023


El 23/2/23 a les 9:43, Michael Van Canneyt via lazarus ha escrit:
> 

>>
>> Something like this:
>>
>> https://docwiki.embarcadero.com/RADStudio/Rio/en/Browsing_Tables_(FireDAC)#Live_Data_Window_Mode
> 
> This is not something that the grid handles. This is a dataset feature.

Yes, I supposed so

> 
> At this moment I know of no FPC/Lazarus dataset component that handles 
> this automatically.

bummer :-(

> Note the remark on that page:
> 
> "Although FireDAC minimizes the number of generated and executed SQL 
> commands in LDW mode,
>   it still produces a heavier DB load than TFDQuery. So, application 
> developers should
>   carefully choose when to use TFDTable and LDW mode. "
> 
> This is exactly why FPC does not have a database table component. It's 
> horribly inefficient.

OTOH a TDBGrid is a very convenient way to display data.
I my application I just use it to display (in read-only mode) an sqlite 
table that holds less than 1000 records and it could be updated quite 
frequently (hence the need for the frequent TDataset.refresh), and it 
works fast enough with that limited amount of records.
Now I need to expand the table to 10000 records and the performance is 
unacceptable.

Bye
-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007



More information about the lazarus mailing list