mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 05:35:13 +03:00
make sure indexes are used
This commit is contained in:
parent
33ba6896a8
commit
f017e1e9a1
@ -849,7 +849,8 @@ BEGIN
|
||||
FROM placex
|
||||
WHERE osm_type = 'R' and class = 'boundary' and type = 'administrative'
|
||||
and admin_level < NEW.admin_level and admin_level > 3
|
||||
and rank_address > 0
|
||||
and rank_address between 1 and 25 -- for index selection
|
||||
and ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon') -- for index selection
|
||||
and geometry && NEW.centroid and _ST_Covers(geometry, NEW.centroid)
|
||||
ORDER BY admin_level desc LIMIT 1
|
||||
LOOP
|
||||
|
Loading…
Reference in New Issue
Block a user