mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 02:47:59 +00:00
further split up the big geometry index
Adds partial indexes for all geometry queries used during import. A full index is not necessary anymore at that point. Still create the index afterwards for use in queries. Also adds documentation for all indexes on where they are used.
This commit is contained in:
@@ -52,7 +52,9 @@ BEGIN
|
||||
|
||||
IF parent_place_id is null THEN
|
||||
FOR location IN SELECT place_id FROM placex
|
||||
WHERE ST_DWithin(geom, placex.geometry, 0.001) and placex.rank_search = 26
|
||||
WHERE ST_DWithin(geom, placex.geometry, 0.001)
|
||||
and placex.rank_search = 26
|
||||
and placex.osm_type = 'W' -- needed for index selection
|
||||
ORDER BY CASE WHEN ST_GeometryType(geom) = 'ST_Line' THEN
|
||||
(ST_distance(placex.geometry, ST_LineInterpolatePoint(geom,0))+
|
||||
ST_distance(placex.geometry, ST_LineInterpolatePoint(geom,0.5))+
|
||||
|
||||
Reference in New Issue
Block a user