diff --git a/lib/stop_times.js b/lib/stop_times.js index 460331c..008093d 100644 --- a/lib/stop_times.js +++ b/lib/stop_times.js @@ -108,6 +108,9 @@ AND "${opt.schema}".stop_times.stop_sequence = t.stop_sequence; CREATE INDEX ON "${opt.schema}".stop_times (stop_sequence_consec); CREATE INDEX ON "${opt.schema}".stop_times (trip_id, stop_sequence_consec); +CREATE INDEX ON "${opt.schema}".stop_times (arrival_time DESC NULLS LAST); +CREATE INDEX ON "${opt.schema}".stop_times (departure_time DESC NULLS LAST); +-- todo: are these two necessary? CREATE INDEX ON "${opt.schema}".stop_times (arrival_time); CREATE INDEX ON "${opt.schema}".stop_times (departure_time);