tables icon indicating copy to clipboard operation
tables copied to clipboard

Limit fetching of rows to a certain threshold

Open blizzz opened this issue 1 year ago • 6 comments

Contributes to #941

Currently the frontend tries to load all rows from a table or view. This is currently not a problem in rendering, but can be a problem for loading times, client RAM usage, and limit of roughly 65k/3 in Postgres that we may run against in the current approach.

In #1507 we prepare a backend API that can take necessary parameters to do effective pagination, even with dynamic values provided.

In a first step we want to limit the maximum number of rows to be fetched, while keeping the current pagination system. When requesting the value, dynamic filters and sorting rules shall also be supplied with the query.

The frontend shall request to load 1101 rows (eleven complete pages, plus and indicator of 1 for more rows). If there are more data rows available, the user shall be informed by a message with the hint that filtered loading and sorting can finetune the result set.

Internally, we store the information whether this table or view is loaded fully or just partially.

blizzz avatar Dec 16 '24 14:12 blizzz

to load 1101 rows (eleven complete pages, plus and indicator of 1 for more rows)

Why/How did we choose this number? As in, why not 1001, for example?

enjeck avatar Dec 20 '24 16:12 enjeck

Good morning. Can the number of rows be limited in customizing or table settings?

ISC-PRO avatar Jan 06 '25 09:01 ISC-PRO

to load 1101 rows (eleven complete pages, plus and indicator of 1 for more rows)

Why/How did we choose this number? As in, why not 1001, for example?

The thought behind is is the current page (100 rows) plus 5 pages before and after (25100), plus 1 for an indicator whether there are more entries.

blizzz avatar Jan 06 '25 15:01 blizzz

Good morning. Can the number of rows be limited in customizing or table settings?

At the moment it is unlimited, so anything that we come up with should be more performant. It has the most effect on the browser, and that can be very individual from laptops and PCs with loads of RAM to puny phones and old devices with little RAM. So ideally we can figure out a good number dynamically, if needed. I would refrain from a setting for this.

blizzz avatar Jan 06 '25 15:01 blizzz

Good morning. Can the number of rows be limited in customizing or table settings?

At the moment it is unlimited, so anything that we come up with should be more performant. It has the most effect on the browser, and that can be very individual from laptops and PCs with loads of RAM to puny phones and old devices with little RAM. So ideally we can figure out a good number dynamically, if needed. I would refrain from a setting for this.

Paging is currently displayed. But 100 rows are too many for our users. We would like to limit the number to 25 per page. Can I make this setting?

ISC-PRO avatar Jan 06 '25 15:01 ISC-PRO

It is displayed, but it is fake in so far as all rows are being loaded at once (but it is not heavy on the browser). The number is hard coded.

blizzz avatar Jan 06 '25 15:01 blizzz