From: Kaj-Michael Lang Date: Tue, 17 Jul 2007 12:12:24 +0000 (+0300) Subject: Split out indexes from table definition X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65c9642f8a580f44cb02aa4c34eebb727038f7e0;p=mapper Split out indexes from table definition --- diff --git a/docs/osm-indexes.sql b/docs/osm-indexes.sql new file mode 100644 index 0000000..7bbe9ab --- /dev/null +++ b/docs/osm-indexes.sql @@ -0,0 +1,5 @@ +CREATE INDEX node_ll_idx on nodes (lat,lon); +CREATE INDEX way_seg_node_idx on way_seg (node); +CREATE UNIQUE INDEX poi_lat_lon_idx on poi (lat, lon, cat_id); +CREATE INDEX poi_priority on poi (priority); +CREATE INDEX name_idx on way_names (name); diff --git a/docs/osm-tables.sql b/docs/osm-tables.sql index e8d87d2..43d0ecb 100644 --- a/docs/osm-tables.sql +++ b/docs/osm-tables.sql @@ -5,8 +5,6 @@ create table nodes ( l int not null default 0 ); -create index node_ll_idx on nodes (lat,lon); - create table way ( wid int primary key, type int not null, @@ -21,8 +19,6 @@ create table way_seg ( node int not null ); -create index way_seg_node_idx on way_seg (node); - create table area ( waid int not null, num int not null, @@ -54,7 +50,7 @@ create table places ( isin int ); -CREATE TABLE poi ( +create table poi ( poi_id integer PRIMARY KEY, lat real not null, lon real not null, @@ -67,7 +63,3 @@ CREATE TABLE poi ( osm_id integer default 0, priority int default 2 ); - -CREATE UNIQUE INDEX poi_lat_lon_idx on poi (lat, lon, cat_id); -CREATE INDEX poi_priority on poi (priority); -CREATE INDEX name_idx on way_names (name);