]> git.openstreetmap.org Git - nominatim.git/commitdiff
modifiers to encourage use of indices
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 5 May 2012 09:38:26 +0000 (11:38 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 5 May 2012 09:38:26 +0000 (11:38 +0200)
sql/functions.sql

index c47f491cd1c6cbd8fa1b3f0bfdf836a1198b039b..a68a90b3c151af7da22b4df87734cf73cee8c611 100644 (file)
@@ -1573,7 +1573,7 @@ BEGIN
           make_standard_name(name->'name') = make_standard_name(NEW.name->'name')
           AND placex.rank_search = NEW.rank_search
           AND placex.place_id != NEW.place_id
-          AND osm_type = 'N'
+          AND placex.osm_type = 'N' AND placex.rank_search < 26
           AND st_contains(NEW.geometry, placex.geometry)
         LOOP
 
@@ -2782,4 +2782,4 @@ EXCEPTION
   WHEN others THEN return null;
 END;
 $$
-LANGUAGE plpgsql;
+LANGUAGE plpgsql IMMUTABLE;