Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Estimate or disable the total number query #106

Open
cnwangjie opened this issue Oct 18, 2024 · 0 comments
Open

[Feature Request] Estimate or disable the total number query #106

cnwangjie opened this issue Oct 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cnwangjie
Copy link

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:

  1. Allow to prohibit querying the total number of rows. This is the easiest to achieve. But it's rather crude and simple.
  2. 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.)
@cnwangjie cnwangjie added the enhancement New feature or request label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant