Skip to content

Instantly share code, notes, and snippets.

@Scarysize
Created December 5, 2017 14:19
Show Gist options
  • Save Scarysize/6d1ad5f1f56935d41f82271a210a8211 to your computer and use it in GitHub Desktop.
Save Scarysize/6d1ad5f1f56935d41f82271a210a8211 to your computer and use it in GitHub Desktop.
-- create indices to speed up queries
-- TRIPS
create index trips_trip_id on trips (trip_id);
create index trips_service_id on trips (service_id);
-- STOP_TIMES
create index stop_times_trips on stop_times (trip_id);
create index stop_times_stop_id on stop_times (stop_id);
-- SHAPES
create index shapes_shape_id on shapes (shape_id);
-- STOPS
create index stops_stop_id on stops (stop_id);
-- CALENDAR
create index calendar_service_id on calendar (service_id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment