- and class = 'place' and type != 'postcode' and linked_place_id is null;
-CREATE INDEX idx_placex_wikidata on placex USING BTREE ((extratags -> 'wikidata')) {{db.tablespace.address_index}} WHERE extratags ? 'wikidata' and class = 'place' and osm_type = 'N' and rank_search < 26;
+ and class = 'place' and type != 'postcode';
+
+-- Usage: - is node part of a way?
+-- - find parent of interpolation spatially
+CREATE INDEX idx_placex_geometry_lower_rank_ways ON placex
+ USING {{postgres.spgist_geom}} (geometry) {{db.tablespace.address_index}}
+ WHERE osm_type = 'W' and rank_search >= 26;
+
+-- Usage: - linking place nodes by wikidata tag to boundaries
+CREATE INDEX idx_placex_wikidata on placex
+ USING BTREE ((extratags -> 'wikidata')) {{db.tablespace.address_index}}
+ WHERE extratags ? 'wikidata' and class = 'place'
+ and osm_type = 'N' and rank_search < 26;
+
+-- The following two indexes function as a todo list for indexing.
+
+CREATE INDEX idx_placex_rank_address_sector ON placex
+ USING BTREE (rank_address, geometry_sector) {{db.tablespace.address_index}}
+ WHERE indexed_status > 0;
+
+CREATE INDEX idx_placex_rank_boundaries_sector ON placex
+ USING BTREE (rank_search, geometry_sector) {{db.tablespace.address_index}}
+ WHERE class = 'boundary' and type = 'administrative'
+ and indexed_status > 0;
+