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

Index page row counts only for DBs with < 30 tables (10ms count limit per table) #467

Closed
simonw opened this issue May 16, 2019 · 2 comments
Labels
Milestone

Comments

@simonw
Copy link
Owner

simonw commented May 16, 2019

Split out from #460.

If a database is mutable, calculating row counts gets expensive. I'm only going to calculate row counts for the index page if it has less than X tables (both hidden and non-hidden) AND each table can be counted in less than 10ms.

If any count takes longer than 10ms I'll cancel the counting entirely. We currently show an inaccurate count if this happens, which is just confusing.

@simonw simonw added the small label May 16, 2019
@simonw simonw added this to the 0.28 milestone May 16, 2019
@simonw simonw changed the title Index page row counts only for DBs with < 20 tables (10ms count limit per table) Index page row counts only for DBs with < 30 tables (10ms count limit per table) May 16, 2019
@simonw
Copy link
Owner Author

simonw commented May 16, 2019

I'm setting X to 30 because the fixtures database currently has 26 tables (22 visible, 4 hidden) and I want to display counts for it.

@simonw
Copy link
Owner Author

simonw commented May 16, 2019

I'm going to be lazy and skip the unit test for this, because I don't currently have a neat way of mocking a SQL interrupted exception to simulate a query taking too long (at least for these counts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant