diff --git a/src/gtfs_tables.sqlite b/src/gtfs_tables.sqlite index 6de96bd..7f01410 100644 --- a/src/gtfs_tables.sqlite +++ b/src/gtfs_tables.sqlite @@ -255,6 +255,7 @@ create table gtfs_stop_times ( create index arr_time_index on gtfs_stop_times(arrival_time_seconds); create index dep_time_index on gtfs_stop_times(departure_time_seconds); create index stop_seq_index on gtfs_stop_times(trip_id,stop_sequence); +create index shape_seq_index on gtfs_shapes(shape_id,shape_pt_sequence); -- select AddGeometryColumn( 'gtfs_shapes', 'shape', #{WGS84_LATLONG_EPSG}, 'LINESTRING', 2 ); diff --git a/src/gtfs_tables_dropindexes.sql b/src/gtfs_tables_dropindexes.sql index 0fdcb67..ab49f13 100644 --- a/src/gtfs_tables_dropindexes.sql +++ b/src/gtfs_tables_dropindexes.sql @@ -1,6 +1,7 @@ drop index arr_time_index; drop index dep_time_index; drop index stop_seq_index; +drop index shape_seq_index; ALTER TABLE gtfs_agency DROP CONSTRAINT agency_name_pkey CASCADE; ALTER TABLE gtfs_stops DROP CONSTRAINT stops_id_pkey CASCADE; diff --git a/src/gtfs_tables_dropindexes.sqlite b/src/gtfs_tables_dropindexes.sqlite index d18c652..3cffcad 100644 --- a/src/gtfs_tables_dropindexes.sqlite +++ b/src/gtfs_tables_dropindexes.sqlite @@ -2,4 +2,5 @@ drop index arr_time_index; drop index dep_time_index; -drop index stop_seq_index; \ No newline at end of file +drop index stop_seq_index; +drop index shape_seq_index; diff --git a/src/gtfs_tables_makeindexes.sql b/src/gtfs_tables_makeindexes.sql index 5ba6d29..85ca693 100644 --- a/src/gtfs_tables_makeindexes.sql +++ b/src/gtfs_tables_makeindexes.sql @@ -122,6 +122,7 @@ ALTER TABLE gtfs_stop_times create index arr_time_index on gtfs_stop_times(arrival_time_seconds); create index dep_time_index on gtfs_stop_times(departure_time_seconds); create index stop_seq_index on gtfs_stop_times(trip_id,stop_sequence); +create index shape_seq_index on gtfs_shapes(shape_id,shape_pt_sequence); ALTER TABLE gtfs_frequencies ADD CONSTRAINT freq_tid_fkey FOREIGN KEY (trip_id) diff --git a/src/gtfs_tables_makeindexes.sqlite b/src/gtfs_tables_makeindexes.sqlite index 2ebc2f2..1a7b6a0 100644 --- a/src/gtfs_tables_makeindexes.sqlite +++ b/src/gtfs_tables_makeindexes.sqlite @@ -3,4 +3,5 @@ create index arr_time_index on gtfs_stop_times(arrival_time_seconds); create index dep_time_index on gtfs_stop_times(departure_time_seconds); -create index stop_seq_index on gtfs_stop_times(trip_id,stop_sequence); \ No newline at end of file +create index stop_seq_index on gtfs_stop_times(trip_id,stop_sequence); +create index shape_seq_index on gtfs_shapes(shape_id,shape_pt_sequence);