Merge pull request #2233 from lonvia/index-for-postcode-ids

Create postcode id index earlier
This commit is contained in:
Sarah Hoffmann 2021-03-23 09:18:10 +01:00 committed by GitHub
commit 28b4fb12b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -35,9 +35,6 @@ CREATE INDEX {{sql.if_index_not_exists}} idx_osmline_parent_place_id
CREATE INDEX {{sql.if_index_not_exists}} idx_osmline_parent_osm_id
ON location_property_osmline USING BTREE (osm_id) {{db.tablespace.search_index}};
CREATE UNIQUE INDEX {{sql.if_index_not_exists}} idx_postcode_id
ON location_postcode USING BTREE (place_id) {{db.tablespace.search_index}};
CREATE INDEX {{sql.if_index_not_exists}} idx_postcode_postcode
ON location_postcode USING BTREE (postcode) {{db.tablespace.search_index}};

View File

@ -209,6 +209,7 @@ CREATE TABLE location_postcode (
postcode TEXT,
geometry GEOMETRY(Geometry, 4326)
);
CREATE UNIQUE INDEX idx_postcode_id ON location_postcode USING BTREE (place_id) {{db.tablespace.search_index}};
CREATE INDEX idx_postcode_geometry ON location_postcode USING GIST (geometry) {{db.tablespace.address_index}};
GRANT SELECT ON location_postcode TO "{{config.DATABASE_WEBUSER}}" ;