Skip to content

Commit

Permalink
Remove unnecessary index and duplicate WHERE
Browse files Browse the repository at this point in the history
  • Loading branch information
pnorman committed May 19, 2016
1 parent f6d2b67 commit dfb6356
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CREATE INDEX planet_osm_roads_admin
WHERE boundary = 'administrative';
CREATE INDEX planet_osm_roads_roads_ref
ON planet_osm_roads USING GIST (way)
WHERE WHERE highway IS NOT NULL AND ref IS NOT NULL;
WHERE highway IS NOT NULL AND ref IS NOT NULL;
CREATE INDEX planet_osm_roads_admin_low
ON planet_osm_roads USING GIST (way)
WHERE boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4');
Expand All @@ -29,9 +29,6 @@ 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_point_place_low
ON planet_osm_point USING GIST (way)
WHERE place IN ('city', 'town') AND name IS NOT NULL;
CREATE INDEX planet_osm_point_place
ON planet_osm_point USING GIST (way)
WHERE place IS NOT NULL AND name IS NOT NULL;
4 changes: 1 addition & 3 deletions indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

point:
# The point table is small, but so are the partial indexes
place_low:
where: place IN ('city', 'town') AND name IS NOT NULL
place:
where: place IS NOT NULL AND name IS NOT NULL
line:
Expand All @@ -31,4 +29,4 @@ roads:
admin:
where: boundary = 'administrative'
roads_ref:
where: WHERE highway IS NOT NULL AND ref IS NOT NULL
where: highway IS NOT NULL AND ref IS NOT NULL

0 comments on commit dfb6356

Please sign in to comment.