From 15065ae242a32fcbe2040dd3c12bd23b4086d9c5 Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Wed, 18 May 2016 19:37:41 -0700 Subject: [PATCH] Add a way_area index for z6 performance --- indexes.sql | 3 +++ indexes.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/indexes.sql b/indexes.sql index 8b07450d13..e392840846 100644 --- a/indexes.sql +++ b/indexes.sql @@ -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; diff --git a/indexes.yml b/indexes.yml index 3539d7e3ee..fe4882223b 100644 --- a/indexes.yml +++ b/indexes.yml @@ -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