]> git.openstreetmap.org Git - nominatim.git/commitdiff
add index for Tiger housenumber queries
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 23 Nov 2021 19:24:08 +0000 (20:24 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 24 Nov 2021 10:10:20 +0000 (11:10 +0100)
lib-sql/tiger_import_finish.sql

index 1a9dc2ddf1da980af4ebfa76856e62c47e9c5f87..fb76477c3db83ac9ecd480b8362dcdbba3899663 100644 (file)
@@ -1,6 +1,10 @@
 --index only on parent_place_id
 CREATE INDEX IF NOT EXISTS idx_location_property_tiger_parent_place_id_imp
-  ON location_property_tiger_import (parent_place_id) {{db.tablespace.aux_index}};
+  ON location_property_tiger_import (parent_place_id)
+{% if postgres.has_index_non_key_column %}
+  INCLUDE (startnumber, endnumber)
+{% endif %}
+  {{db.tablespace.aux_index}};
 CREATE UNIQUE INDEX IF NOT EXISTS idx_location_property_tiger_place_id_imp
   ON location_property_tiger_import (place_id) {{db.tablespace.aux_index}};