-
Notifications
You must be signed in to change notification settings - Fork 576
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
Remove unused indexes #1516
Comments
Thank you, this is really interesting. Many of them are geometry indexes. Isn't there any slowdown during generating? Every
Thanks! |
Good question. I'm going to run a full z14 .mbtiles of a US state, then run the same query, and then intersect that list against this list and see if that reduces the number. The integrity script does generate a tileset so in theory it's executing the whole chain. Perhaps some of these geometry indexes are duplicated in certain cases. I'm not really sure why some of these appear unused either but it seems worth digging into. |
That reduced the count slightly, to 265 unused indexes. |
It appears that at least some of these indexes are actually auto-generated by imposm, so those should be filtered out so we're only looking at a list of indexes that we create. |
I've updated this list to only include indexes that are actually created by the layer SQL (excludes imposm auto-generated indexes) |
Results from incomplete planet run of the transportation layer(s):
|
From overnight planet render of the place layer (aborted before completion):
|
Hey, with the recent merges of the Update Performance pull requests the index usage has changed significantly so we should also run an update affecting all layers to ensure indexes are not used there. |
So am have imported austria from september 2022 based on the new master branch and am currently running updates. will post the results of |
Just removed another handful of indexes from the list that aren't actually made in the SQL layer. |
Hey sorry was unfortunately occupied with other topics... Have finally completed an import and update for the mentioned area and attached a json with indexes w/o any accesses. |
Based on analysis from planet builds for this layer as well as running updates via the integrity script as discussed in #1516, these three indexes are not used and can be removed.
There are a significant number of indexes in OpenMapTiles that appear to be unused. If these are truly unused, we could save on import and update performance by removing them. Each index makes inserting or updating data slower because the index has to be updated in addition to the table data. After running the integrity script (which performs import and update action), I found that
27426585756452 indices appear to be unused.I further filtered out this list to:
The SQL query I used is below and a listing of the 75 apparently unused indices is listed below.
Addressed in #1520:
The text was updated successfully, but these errors were encountered: