Data window shows a loading spinner for about ~1.6 min
Ideas of solution
The main source for this loading time is related to the count(*) query.
This database function has to walk through the complete table before it can return
the exact number of rows available.
In the example this takes about 40 s per count call, and it is called 2x.
It will also repeatedly call for each filter that is applied but will perform reasonably.
TO mitigate this, we can attempt to reduce the initial page load as it is not necessary to call count(*) 2x for the same result.
OR use the postgresql statistics module.
TO avoid count(*) in most cases we can pre-calculate this and store it, then only update it once the table was updated.
Description of the issue
We explored the issue regarding to long loading times on tables with 100m+ rows.
Steps to Reproduce
Ideas of solution
The main source for this loading time is related to the count(*) query. This database function has to walk through the complete table before it can return the exact number of rows available.
In the example this takes about 40 s per count call, and it is called 2x. It will also repeatedly call for each filter that is applied but will perform reasonably.
TO mitigate this, we can attempt to reduce the initial page load as it is not necessary to call count(*) 2x for the same result. OR use the postgresql statistics module.
TO avoid count(*) in most cases we can pre-calculate this and store it, then only update it once the table was updated.
Context and Environment
Workflow checklist