explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PpDn

Settings
# exclusive inclusive rows x rows loops node
1. 15.470 145.825 ↓ 18.9 27,456 1

Merge Join (cost=12,387.05..13,042.48 rows=1,453 width=106) (actual time=119.905..145.825 rows=27,456 loops=1)

  • Merge Cond: ((ls.schedule_id = rs.schedule_id) AND (((ls.rn + 1)) = rs.rn))
2. 18.240 56.085 ↑ 1.0 32,045 1

Sort (cost=6,193.53..6,273.64 rows=32,045 width=55) (actual time=52.373..56.085 rows=32,045 loops=1)

  • Sort Key: ls.schedule_id, ((ls.rn + 1))
  • Sort Method: external merge Disk: 2432kB
3. 3.743 37.845 ↑ 1.0 32,045 1

Subquery Scan on ls (cost=0.29..3,795.31 rows=32,045 width=55) (actual time=0.043..37.845 rows=32,045 loops=1)

4. 19.297 34.102 ↑ 1.0 32,045 1

WindowAgg (cost=0.29..3,474.86 rows=32,045 width=127) (actual time=0.041..34.102 rows=32,045 loops=1)

5. 14.805 14.805 ↑ 1.0 32,045 1

Index Scan using schedule_stop_idx1 on schedule_stop schds (cost=0.29..2,914.07 rows=32,045 width=51) (actual time=0.026..14.805 rows=32,045 loops=1)

6. 33.798 74.270 ↑ 1.0 32,045 1

Sort (cost=6,193.53..6,273.64 rows=32,045 width=75) (actual time=67.516..74.270 rows=32,045 loops=1)

  • Sort Key: rs.schedule_id, rs.rn
  • Sort Method: external sort Disk: 3144kB
7. 4.479 40.472 ↑ 1.0 32,045 1

Subquery Scan on rs (cost=0.29..3,795.31 rows=32,045 width=75) (actual time=0.032..40.472 rows=32,045 loops=1)

  • Filter: (rs.elapse_time IS NOT NULL)
8. 21.281 35.993 ↑ 1.0 32,045 1

WindowAgg (cost=0.29..3,474.86 rows=32,045 width=75) (actual time=0.030..35.993 rows=32,045 loops=1)

9. 14.712 14.712 ↑ 1.0 32,045 1

Index Scan using schedule_stop_idx1 on schedule_stop schds_1 (cost=0.29..2,914.07 rows=32,045 width=67) (actual time=0.021..14.712 rows=32,045 loops=1)

Planning time : 0.370 ms
Execution time : 148.264 ms