]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/tables.sql
integrate analyse of indexing into nominatim tool
[nominatim.git] / sql / tables.sql
index cf51cbe68b058ca6b066d2da226bc42271d9a486..d15e42c445eebf71d5cbc1d0b005ee4f1ad3a6bc 100644 (file)
@@ -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
   );
@@ -35,8 +35,6 @@ GRANT UPDATE ON new_query_log TO "{www-user}" ;
 GRANT SELECT ON new_query_log TO "{www-user}" ;
 
 GRANT SELECT ON TABLE country_name TO "{www-user}";
-GRANT SELECT ON TABLE gb_postcode TO "{www-user}";
-GRANT SELECT ON TABLE us_postcode TO "{www-user}";
 
 drop table IF EXISTS word;
 CREATE TABLE word (
@@ -260,3 +258,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'];