speed up reverse lookup of place nodes

Add a special index that contains the place nodes buffered by their
respective area according to their search rank. This replaces the
maximum area search for place nodes and reduces drastically the number
of place nodes that need to be retrieved.
This commit is contained in:
Sarah Hoffmann
2023-02-17 10:31:49 +01:00
parent 3405dbf90e
commit 8ed096f938
5 changed files with 29 additions and 14 deletions

View File

@@ -190,7 +190,6 @@ CREATE INDEX idx_placex_geometry_buildings ON placex
-- Usage: - linking of similar named places to boundaries
-- - linking of place nodes with same type to boundaries
-- - lookupPolygon()
CREATE INDEX idx_placex_geometry_placenode ON placex
USING {{postgres.spgist_geom}} (geometry) {{db.tablespace.address_index}}
WHERE osm_type = 'N' and rank_search < 26