Browse Source

Index creation for start and end time columns. Using boolean type in vector metadata.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51464 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 13 years ago
parent
commit
38e047615c

+ 4 - 0
lib/temporal/SQL/map_tables_template.sql

@@ -38,6 +38,8 @@ CREATE TABLE  GRASS_MAP_relative_time (
   FOREIGN KEY (id) REFERENCES  GRASS_MAP_base (id) ON DELETE CASCADE
 );
 
+CREATE INDEX GRASS_MAP_relative_time_index ON GRASS_MAP_relative_time (start_time, end_time);
+
 CREATE TABLE  GRASS_MAP_absolute_time (
   id VARCHAR NOT NULL,   -- The id (PFK) is the unique identifier for all tables, it is based on name and mapset (name@mapset) and is used as primary foreign key
   start_time TIMESTAMP,  --  Start of the valid time, can be NULL if no time information is available
@@ -47,6 +49,8 @@ CREATE TABLE  GRASS_MAP_absolute_time (
   FOREIGN KEY (id) REFERENCES  GRASS_MAP_base (id) ON DELETE CASCADE
 );
 
+CREATE INDEX GRASS_MAP_absolute_time_index ON GRASS_MAP_absolute_time (start_time, end_time);
+
 -- The spatial extent of a raster map
 
 CREATE TABLE  GRASS_MAP_spatial_extent (

+ 1 - 1
lib/temporal/SQL/vector_metadata_table.sql

@@ -12,7 +12,7 @@
 CREATE TABLE  vector_metadata (
   id VARCHAR NOT NULL,    -- The id (PFK) is the unique identifier for all tables, it is based on name and mapset (name@mapset) and is used as primary foreign key
   stvds_register VARCHAR, -- The name of the table storing all space-time vector datasets in which this map is registered
-  is_3d INTEGER,          -- This is 1 if the vector map is 3d and 0 otherwise 
+  is_3d BOOLEAN,          -- This is 1 if the vector map is 3d and 0 otherwise 
   points INTEGER,         -- The number of points
   lines INTEGER,          -- The number of lines
   boundaries INTEGER,     -- The number of boundaries