PostgreSQL table edit, memory consumption lazarus / 16-Databases ---------------------------------------------------------------------- tatamata · 2020-06-16 06:01 Hello. Dynamically created PostgreSQL table (size is not known in advance) is queried by TSQLQuery and presented in RxDBGrid for reading, editing, searching, filtering and exporting to spreadsheet or plain text files. The dataset must be editable and forward/backward browseable, readonly or unidirectional is not an option! When underlying table is big, memory (16 GB) is completely consumed. I need recommendations about alternative approaches - instead of TSQLQuery I need some other way to browse/edit underlying PostgreSQL table that will not load all rows in memory at once, but in chunks while browsing. Is ZTable (from ZeosDBO) a viable alternative? Is there any other dataset components, instead of TSQLQuery, which can browse underlying PostgreSQL table (for editing), in small chunks, not overconsuming RAM? ---------------------------------------------------------------------- tatamata · 2020-06-16 21:35 Hi, any Lazarus Zeosdbo user to provide some recommendation/experience in dealing with browsing/editing huge PostgreSQL tables? ---------------------------------------------------------------------- tatamata · 2020-12-02 11:57 Just to update on this topic, if anybody else will have similar issue - I have solved my memory consumption trouble by switching from TSQLQuery to Zeso TZTable component. Dynamically created sql query with "crate table ...as" is executed, resultset is saved as PostgreSQL table, which is then loaded by ZTable component into RxDBGrid. Indeed, Zeos TZTable does not have memory issues like SQLQuery, with loading huge PostgreSQL table.