You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each time the app opens a table, it will attempt to retrieve the total number of rows in the table and display it in the lower left corner. However, when used in actual production environments, directly using SELECT COUNT for total row count queries on the Postgres database will take a long time. This will cause the page to be unable to open and put some pressure on the database. Therefore, it is best to optimize for databases such as Postgres.
I think there are the following ways:
Allow to prohibit querying the total number of rows. This is the easiest to achieve. But it's rather crude and simple.
For databases like Postgres, first estimate the total number of rows through pg_class. When the quantity is too large (like millions of rows), only display the estimated number of rows. (This can be a bit complicated to implement. Because he needs to implement it specifically for the database engine.)
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
Each time the app opens a table, it will attempt to retrieve the total number of rows in the table and display it in the lower left corner. However, when used in actual production environments, directly using
SELECT COUNT
for total row count queries on the Postgres database will take a long time. This will cause the page to be unable to open and put some pressure on the database. Therefore, it is best to optimize for databases such as Postgres.I think there are the following ways:
The text was updated successfully, but these errors were encountered: