]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/specialphrases.php
improve import performance for special phrases
[nominatim.git] / utils / specialphrases.php
index 3baf09f255edbeb862bb91577c43b4f80ebee29e..5b3abe405120f1a913724b903d02340898d45de5 100755 (executable)
                        }
                }
 
+        echo "create index idx_placex_classtype on placex (class, type);";
+
                foreach($aPairs as $aPair)
                {
+                       if ($aPair[1] == 'highway') continue;
 
                        echo "create table place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])." as ";
                        echo "select place_id as place_id,st_centroid(geometry) as centroid from placex where ";
@@ -94,5 +97,9 @@
                        echo "CREATE INDEX idx_place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])."_place_id ";
                        echo "ON place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])." USING btree(place_id);\n";
 
+            echo "GRANT SELECT ON place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])." TO \"www-data\";";
+
                }
+
+        echo "drop index idx_placex_classtype;";
        }