Am 27.06.2010 11:49, schrieb Peter Körner:
The import is now nearly over, it'll take some hours to complete, i
The import is over now. It's still experimental but could offer us some
new features:
select osm_id, "wikipedia:" from planet_hc_point where not "wikipedia:"
is null limit 50;
select osm_id, "name:" from planet_hc_point where not "name:" is null
limit 50;
I did not create all possible indexes (see attached file). The
conditional btree indexes allow for a fast search for set fields (see
above) while the gin indexed allow for fast key/value lookups.
I already created planet_hc_point_has_wikipedias and
planet_hc_point_has_names to test the above two queries.
Peter
create index planet_hc_point_tags on planet_hc_point using gin(tags);
create index planet_hc_point_wikipedias on planet_hc_point using
gin("wikipedia:");
create index planet_hc_point_names on planet_hc_point using gin("name:");
create index planet_hc_point_addrs on planet_hc_point using gin("addr:");
create index planet_hc_point_has_wikipedias on planet_hc_point using
btree(osm_id) where not "wikipedia:" is null;
create index planet_hc_point_has_names on planet_hc_point using btree(osm_id)
where not "name:" is null;
create index planet_hc_point_has_addrs on planet_hc_point using btree(osm_id)
where not "addr:" is null;
create index planet_hc_line_tags on planet_hc_line using gin(tags);
create index planet_hc_line_wikipedias on planet_hc_line using
gin("wikipedia:");
create index planet_hc_line_names on planet_hc_line using gin("name:");
create index planet_hc_line_addrs on planet_hc_line using gin("addr:");
create index planet_hc_line_has_wikipedias on planet_hc_line using
btree(osm_id) where not "wikipedia:" is null;
create index planet_hc_line_has_names on planet_hc_line using btree(osm_id)
where not "name:" is null;
create index planet_hc_line_has_addrs on planet_hc_line using btree(osm_id)
where not "addr:" is null;
create index planet_hc_polygon_tags on planet_hc_polygon using gin(tags);
create index planet_hc_polygon_wikipedias on planet_hc_polygon using
gin("wikipedia:");
create index planet_hc_polygon_names on planet_hc_polygon using gin("name:");
create index planet_hc_polygon_addrs on planet_hc_polygon using gin("addr:");
create index planet_hc_polygon_has_wikipedias on planet_hc_polygon using
btree(osm_id) where not "wikipedia:" is null;
create index planet_hc_polygon_has_names on planet_hc_polygon using
btree(osm_id) where not "name:" is null;
create index planet_hc_polygon_has_addrs on planet_hc_polygon using
btree(osm_id) where not "addr:" is null;
create index planet_hc_roads_tags on planet_hc_roads using gin(tags);
create index planet_hc_roads_wikipedias on planet_hc_roads using
gin("wikipedia:");
create index planet_hc_roads_names on planet_hc_roads using gin("name:");
create index planet_hc_roads_addrs on planet_hc_roads using gin("addr:");
create index planet_hc_roads_has_wikipedias on planet_hc_roads using
btree(osm_id) where not "wikipedia:" is null;
create index planet_hc_roads_has_names on planet_hc_roads using btree(osm_id)
where not "name:" is null;
create index planet_hc_roads_has_addrs on planet_hc_roads using btree(osm_id)
where not "addr:" is null;_______________________________________________
Maps-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/maps-l