explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qU9G

Settings
# exclusive inclusive rows x rows loops node
1. 172,521.432 240,164.456 ↓ 0.0 0 1

Update on gtfs_stop_times_history sth (cost=442,607.96..454,641.84 rows=78,390 width=145) (actual time=240,164.456..240,164.456 rows=0 loops=1)

2. 15,090.902 67,643.024 ↓ 13.2 1,036,544 1

Merge Join (cost=442,607.96..454,641.84 rows=78,390 width=145) (actual time=41,979.493..67,643.024 rows=1,036,544 loops=1)

  • Merge Cond: ((sth.trip_id = tt.trip_id) AND (sth.stop_sequence = tt.stop_sequence))
3. 20,202.217 24,532.349 ↓ 1.2 1,036,544 1

Sort (cost=347,249.03..349,383.54 rows=853,802 width=107) (actual time=21,261.763..24,532.349 rows=1,036,544 loops=1)

  • Sort Key: sth.trip_id, sth.stop_sequence
  • Sort Method: external merge Disk: 97216kB
4. 4,330.132 4,330.132 ↓ 1.2 1,036,544 1

Seq Scan on gtfs_stop_times_history sth (cost=0.00..114,296.91 rows=853,802 width=107) (actual time=42.285..4,330.132 rows=1,036,544 loops=1)

  • Filter: ('2014-08-01 07:00:01+00'::timestamp with time zone <@ t_range)
  • Rows Removed by Filter: 2031870
5. 4,449.720 28,019.773 ↓ 2.2 1,036,544 1

Materialize (cost=95,358.93..97,684.18 rows=465,049 width=74) (actual time=20,717.683..28,019.773 rows=1,036,544 loops=1)

6. 20,785.735 23,570.053 ↓ 2.2 1,036,544 1

Sort (cost=95,358.93..96,521.55 rows=465,049 width=74) (actual time=20,717.669..23,570.053 rows=1,036,544 loops=1)

  • Sort Key: tt.trip_id, tt.stop_sequence
  • Sort Method: external merge Disk: 34456kB
7. 2,784.318 2,784.318 ↓ 2.2 1,036,544 1

Seq Scan on gtfs_stop_times_temp tt (cost=0.00..10,253.49 rows=465,049 width=74) (actual time=0.045..2,784.318 rows=1,036,544 loops=1)