X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4c593fa859f0ffa8d3bac817e7954e28bc8a840a..861e67dfe848a9d322bdb2b7b89fb669f10ae731:/sql/tables.sql

diff --git a/sql/tables.sql b/sql/tables.sql
index cf51cbe6..8647e304 100644
--- a/sql/tables.sql
+++ b/sql/tables.sql
@@ -1,6 +1,6 @@
 drop table if exists import_status;
 CREATE TABLE import_status (
-  lastimportdate timestamp NOT NULL,
+  lastimportdate timestamp with time zone NOT NULL,
   sequence_id integer,
   indexed boolean
   );
@@ -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'];
