Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a new index to the gtfs_shapes table. #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/gtfs_tables.sqlite
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
1 change: 1 addition & 0 deletions src/gtfs_tables_dropindexes.sql
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/gtfs_tables_dropindexes.sqlite
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

drop index arr_time_index;
drop index dep_time_index;
drop index stop_seq_index;
drop index stop_seq_index;
drop index shape_seq_index;
1 change: 1 addition & 0 deletions src/gtfs_tables_makeindexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/gtfs_tables_makeindexes.sqlite
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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);