Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 3339:790c12c55abb
Backend: Added DB indices for fasten access to cross section points.
flys-backend/trunk@4927 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 11 Jul 2012 10:37:03 +0000 |
parents | c3e049961685 |
children | 3442304b430a |
comparison
equal
deleted
inserted
replaced
3338:e19a503e4150 | 3339:790c12c55abb |
---|---|
277 id int PRIMARY KEY NOT NULL, | 277 id int PRIMARY KEY NOT NULL, |
278 river_id int NOT NULL REFERENCES rivers(id), | 278 river_id int NOT NULL REFERENCES rivers(id), |
279 time_interval_id int REFERENCES time_intervals(id), | 279 time_interval_id int REFERENCES time_intervals(id), |
280 description VARCHAR(256) | 280 description VARCHAR(256) |
281 ); | 281 ); |
282 | |
283 -- Indices for faster access of the points | |
284 CREATE INDEX cross_section_lines_km_idx | |
285 ON cross_section_lines(km); | |
286 CREATE INDEX cross_section_points_line_idx | |
287 ON cross_section_points(cross_section_line_id); | |
282 | 288 |
283 CREATE SEQUENCE CROSS_SECTION_LINES_ID_SEQ; | 289 CREATE SEQUENCE CROSS_SECTION_LINES_ID_SEQ; |
284 | 290 |
285 CREATE TABLE cross_section_lines ( | 291 CREATE TABLE cross_section_lines ( |
286 id int PRIMARY KEY NOT NULL, | 292 id int PRIMARY KEY NOT NULL, |