From 65c9642f8a580f44cb02aa4c34eebb727038f7e0 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 17 Jul 2007 15:12:24 +0300 Subject: [PATCH] Split out indexes from table definition --- docs/osm-indexes.sql | 5 +++++ docs/osm-tables.sql | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 docs/osm-indexes.sql 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); -- 2.39.5