explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VhO4

Settings
# exclusive inclusive rows x rows loops node
1. 199,267.137 362,027.346 ↓ 0.0 0 1

Update on gtfs_stop_times_history sth (cost=223,837.70..228,456.92 rows=9,342 width=145) (actual time=362,027.346..362,027.346 rows=0 loops=1)

2. 19,395.839 162,760.209 ↓ 107.0 999,753 1

Merge Join (cost=223,837.70..228,456.92 rows=9,342 width=145) (actual time=130,850.025..162,760.209 rows=999,753 loops=1)

  • Merge Cond: ((tt.trip_id = sth.trip_id) AND (tt.stop_sequence = sth.stop_sequence))
3. 19,178.330 21,761.779 ↓ 2.2 1,036,544 1

Sort (cost=95,358.93..96,521.55 rows=465,049 width=74) (actual time=18,953.642..21,761.779 rows=1,036,544 loops=1)

  • Sort Key: tt.trip_id, tt.stop_sequence
  • Sort Method: external merge Disk: 34456kB
4. 2,583.449 2,583.449 ↓ 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=9.990..2,583.449 rows=1,036,544 loops=1)

5. 6,552.651 121,602.591 ↓ 9.9 999,753 1

Materialize (cost=128,478.77..128,986.06 rows=101,458 width=107) (actual time=111,716.585..121,602.591 rows=999,753 loops=1)

6. 20,424.779 115,049.940 ↓ 9.9 999,753 1

Sort (cost=128,478.77..128,732.41 rows=101,458 width=107) (actual time=111,716.580..115,049.940 rows=999,753 loops=1)

  • Sort Key: sth.trip_id, sth.stop_sequence
  • Sort Method: external merge Disk: 93824kB
7. 7,219.097 94,625.161 ↓ 9.9 999,753 1

Bitmap Heap Scan on gtfs_stop_times_history sth (cost=18,576.36..108,247.27 rows=101,458 width=107) (actual time=87,693.494..94,625.161 rows=999,753 loops=1)

  • Recheck Cond: ((t_range <@ '["2014-08-01 07:00:01+00",infinity)'::tstzrange) AND ('["2014-08-01 07:00:01+00",infinity)'::tstzrange <@ t_range))
  • Rows Removed by Index Recheck: 75
8. 87,406.064 87,406.064 ↓ 15.6 1,581,879 1

Bitmap Index Scan on gtfs_stop_times_history_t_range (cost=0.00..18,550.99 rows=101,458 width=0) (actual time=87,406.064..87,406.064 rows=1,581,879 loops=1)

  • Index Cond: ((t_range <@ '["2014-08-01 07:00:01+00",infinity)'::tstzrange) AND ('["2014-08-01 07:00:01+00",infinity)'::tstzrange <@ t_range))