forked from Overv/openstreetmap-tile-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
custom-indexes.sql
45 lines (45 loc) · 4.44 KB
/
custom-indexes.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
DROP INDEX planet_osm_ways_nodes_idx;
CREATE INDEX planet_osm_roads_osm_z_order_idx ON public.planet_osm_roads USING btree (z_order)
CREATE INDEX "idx_poly_aeroway" on planet_osm_polygon USING gist (way) WHERE "aeroway" IS NOT NULL ;
CREATE INDEX "idx_poly_historic" on planet_osm_polygon USING gist (way) WHERE "historic" IS NOT NULL ;
CREATE INDEX "idx_poly_leisure" on planet_osm_polygon USING gist (way) WHERE "leisure" IS NOT NULL ;
CREATE INDEX "idx_poly_man_made" on planet_osm_polygon USING gist (way) WHERE "man_made" IS NOT NULL ;
CREATE INDEX "idx_poly_military" on planet_osm_polygon USING gist (way) WHERE "military" IS NOT NULL ;
CREATE INDEX "idx_poly_power" on planet_osm_polygon USING gist (way) WHERE "power" IS NOT NULL ;
CREATE INDEX "idx_poly_landuse" on planet_osm_polygon USING gist (way) WHERE "landuse" IS NOT NULL ;
CREATE INDEX "idx_poly_amenity" on planet_osm_polygon USING gist (way) WHERE "amenity" IS NOT NULL ;
CREATE INDEX "idx_poly_natural" on planet_osm_polygon USING gist (way) WHERE "natural" IS NOT NULL ;
CREATE INDEX "idx_poly_highway" on planet_osm_polygon USING gist (way) WHERE "highway" IS NOT NULL ;
CREATE INDEX "idx_poly_tourism" on planet_osm_polygon USING gist (way) WHERE "tourism" IS NOT NULL ;
CREATE INDEX "idx_poly_building" on planet_osm_polygon USING gist (way) WHERE "building" IS NOT NULL ;
CREATE INDEX "idx_poly_barrier" on planet_osm_polygon USING gist (way) WHERE "barrier" IS NOT NULL ;
CREATE INDEX "idx_poly_railway" on planet_osm_polygon USING gist (way) WHERE "railway" IS NOT NULL ;
CREATE INDEX "idx_poly_aerialway" on planet_osm_polygon USING gist (way) WHERE "aerialway" IS NOT NULL ;
CREATE INDEX "idx_line_aerialway" on planet_osm_line USING gist (way) WHERE "aerialway" IS NOT NULL ;
CREATE INDEX "idx_line_waterway" on planet_osm_line USING gist (way) WHERE "waterway" IS NOT NULL ;
CREATE INDEX "idx_line_bridge" on planet_osm_line USING gist (way) WHERE "bridge" IS NOT NULL ;
CREATE INDEX "idx_line_tunnel" on planet_osm_line USING gist (way) WHERE "tunnel" IS NOT NULL ;
CREATE INDEX "idx_line_access" on planet_osm_line USING gist (way) WHERE "access" IS NOT NULL ;
CREATE INDEX "idx_line_railway" on planet_osm_line USING gist (way) WHERE "railway" IS NOT NULL ;
CREATE INDEX "idx_line_power" on planet_osm_line USING gist (way) WHERE "power" IS NOT NULL ;
CREATE INDEX "idx_line_name" on planet_osm_line USING gist (way) WHERE "name" IS NOT NULL ;
CREATE INDEX "idx_line_ref" on planet_osm_line USING gist (way) WHERE "ref" IS NOT NULL ;
CREATE INDEX "idx_point_aerialway" on planet_osm_point USING gist (way) WHERE "aerialway" IS NOT NULL ;
CREATE INDEX "idx_point_shop" on planet_osm_point USING gist (way) WHERE "shop" IS NOT NULL ;
CREATE INDEX "idx_point_place" on planet_osm_point USING gist (way) WHERE "place" IS NOT NULL ;
CREATE INDEX "idx_point_barrier" on planet_osm_point USING gist (way) WHERE "barrier" IS NOT NULL ;
CREATE INDEX "idx_point_railway" on planet_osm_point USING gist (way) WHERE "railway" IS NOT NULL ;
CREATE INDEX "idx_point_amenity" on planet_osm_point USING gist (way) WHERE "amenity" IS NOT NULL ;
CREATE INDEX "idx_point_natural" on planet_osm_point USING gist (way) WHERE "natural" IS NOT NULL ;
CREATE INDEX "idx_point_highway" on planet_osm_point USING gist (way) WHERE "highway" IS NOT NULL ;
CREATE INDEX "idx_point_tourism" on planet_osm_point USING gist (way) WHERE "tourism" IS NOT NULL ;
CREATE INDEX "idx_point_power" on planet_osm_point USING gist (way) WHERE "power" IS NOT NULL ;
CREATE INDEX "idx_point_aeroway" on planet_osm_point USING gist (way) WHERE "aeroway" IS NOT NULL ;
CREATE INDEX "idx_point_historic" on planet_osm_point USING gist (way) WHERE "historic" IS NOT NULL ;
CREATE INDEX "idx_point_leisure" on planet_osm_point USING gist (way) WHERE "leisure" IS NOT NULL ;
CREATE INDEX "idx_point_man_made" on planet_osm_point USING gist (way) WHERE "man_made" IS NOT NULL ;
CREATE INDEX "idx_point_waterway" on planet_osm_point USING gist (way) WHERE "waterway" IS NOT NULL ;
CREATE INDEX "idx_point_lock" on planet_osm_point USING gist (way) WHERE "lock" IS NOT NULL ;
CREATE INDEX "idx_point_landuse" on planet_osm_point USING gist (way) WHERE "landuse" IS NOT NULL ;
CREATE INDEX "idx_point_military" on planet_osm_point USING gist (way) WHERE "military" IS NOT NULL ;
CREATE INDEX planet_osm_polygon_name_z6_custom ON planet_osm_polygon USING GIST (ST_PointOnSurface(way)) WHERE name IS NOT NULL AND way_area > 5980000;