X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e26a300c2ff79961a769dec29d1cd0752ffb0f3d..dd06638dec944a38826ad8bef4b86c7d0c858c4a:/sql/tables.sql?ds=sidebyside diff --git a/sql/tables.sql b/sql/tables.sql index cf51cbe6..5686bcd2 100644 --- a/sql/tables.sql +++ b/sql/tables.sql @@ -260,3 +260,6 @@ CREATE TABLE wikipedia_redirect ( ); ALTER TABLE ONLY wikipedia_redirect ADD CONSTRAINT wikipedia_redirect_pkey PRIMARY KEY (language, from_title); +-- osm2pgsql does not create indexes on the middle tables for Nominatim +-- Add one for lookup of associated street relations. +CREATE INDEX planet_osm_rels_parts_associated_idx ON planet_osm_rels USING gin(parts) WHERE tags @> ARRAY['associatedStreet'];