Skip to content

Commit

Permalink
Add a way_area index for z6 performance
Browse files Browse the repository at this point in the history
  • Loading branch information
pnorman committed May 19, 2016
1 parent dfb6356 commit 15065ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ CREATE INDEX planet_osm_polygon_nobuilding
CREATE INDEX planet_osm_polygon_name
ON planet_osm_polygon USING GIST (way)
WHERE name IS NOT NULL;
CREATE INDEX planet_osm_polygon_way_area_z6
ON planet_osm_polygon USING GIST (way)
WHERE way_area > 59750;
CREATE INDEX planet_osm_point_place
ON planet_osm_point USING GIST (way)
WHERE place IS NOT NULL AND name IS NOT NULL;
2 changes: 2 additions & 0 deletions indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ polygon:
where: building IS NULL
military:
where: landuse = 'military'
way_area_z6:
where: way_area > 59750
roads:
# The roads table only has a subset of data, so it's just got some low-zoom
# indexes and some fairly selective ones for high zoom
Expand Down

0 comments on commit 15065ae

Please sign in to comment.