2018-09-25 16:46:08 -04:00
|
|
|
-- Create indexes after bulk loading geometries and building records
|
|
|
|
|
|
|
|
-- Spatial index over geometries
|
2018-09-29 13:13:34 -04:00
|
|
|
CREATE INDEX IF NOT EXISTS geometries_idx ON geometries USING GIST ( geometry_geom );
|
2018-09-25 16:46:08 -04:00
|
|
|
|
|
|
|
-- Source ID index over geometries
|
2018-09-29 13:13:34 -04:00
|
|
|
CREATE INDEX IF NOT EXISTS geometries_source_idx ON geometries ( source_id );
|
2018-09-25 16:46:08 -04:00
|
|
|
|
|
|
|
-- Index over building geometry_id (expect to look up building by geometry_id for map tiles)
|
2018-09-29 13:13:34 -04:00
|
|
|
CREATE INDEX IF NOT EXISTS building_geometry_idx ON buildings ( geometry_id );
|