-
Notifications
You must be signed in to change notification settings - Fork 6
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
ny_times_us_counties needs a "date desc" index #27
Labels
enhancement
New feature or request
Comments
simonw
added a commit
that referenced
this issue
May 29, 2021
simonw
added a commit
that referenced
this issue
May 29, 2021
This reverts commit 9130ab1. Implementing this properly in simonw/sqlite-utils#260
simonw
added a commit
that referenced
this issue
May 29, 2021
Before deploying this change, https://covid-19.datasettes.com/covid?sql=select+*+from+pragma_index_xinfo%28%27idx_ny_times_us_counties_date%27%29 returns:
|
And now:
|
Turns out that wasn't the cause of the performance problem after all! simonw/datasette#1349 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you paginate through the https://covid-19.datasettes.com/covid/ny_times_us_counties table - which now has more than 1.3m records - each page takes ~200ms to query. It's sorted by date, descending with an index on date.
With an index on
date desc
instead each page only takes ~10ms.The text was updated successfully, but these errors were encountered: