-
Notifications
You must be signed in to change notification settings - Fork 819
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
Add custom index information #2100
Conversation
These custom indexes should speed up rendering, particularly at low and middle zooms. Fixes gravitystorm#207
Suggested to me was an index for low zoom admin polygons to reflect the switch to OSM data for low zoom labeling. My benchmarking was prior to this, but I recall it being a good idea. |
The |
This feature is only available in recent versions of PostgreSQL
Updated. |
|
||
CREATE INDEX planet_osm_point_name | ||
ON planet_osm_point USING gist (way) | ||
WHERE name IS NOT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This index is 653MB and only used by text-point
, so I'm not this is worth the additional memory cache pressure.
I have a WIP changing how these are defined to allow creation of SQL statements to reindex, etc. |
Examples are CREATE INDEX planet_osm_roads_admin
ON planet_osm_roads USING GIST (way)
WHERE boundary = 'administrative';
CREATE INDEX planet_osm_roads_admin
ON planet_osm_roads USING GIST (way)
WITH (fillfactor=100)
WHERE boundary = 'administrative';
CREATE INDEX CONCURRENTLY planet_osm_roads_admin
ON planet_osm_roads USING GIST (way)
WHERE boundary = 'administrative';
REINDEX planet_osm_roads_admin;
ALTER INDEX planet_osm_roads_admin RENAME TO planet_osm_roads_admin_old;
CREATE INDEX CONCURRENTLY planet_osm_roads_admin
ON planet_osm_roads USING GIST (way)
WHERE boundary = 'administrative';
DROP INDEX planet_osm_roads_admin_old;
|
admin: | ||
where: boundary = 'administrative' | ||
roads_ref: | ||
where: WHERE highway IS NOT NULL AND ref IS NOT NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't have the WHERE here
I think this is ready |
Thanks! |
These custom indexes should speed up rendering, particularly at low and middle zooms.
Fixes #207
cc @woodpeck @jburgess777 @Firefishy
I'm not recommending any way_area indexes, not because I don't think they're worth it, but because they're more complicated to get right, and I'd rather go ahead and recommend a number of indexes I already know help performance.