explain.depesz.com

PostgreSQL's explain analyze made readable

Result: b2NP

Settings
# exclusive inclusive rows x rows loops node
1. 66.158 193.844 ↓ 171.6 27,456 1

Merge Join (cost=488.32..9,066.55 rows=160 width=143) (actual time=3.823..193.844 rows=27,456 loops=1)

  • Merge Cond: (schds.schedule_id = schd.schedule_id)
  • Join Filter: (((row_number() OVER (?) + 1)) = (row_number() OVER (?)))
  • Rows Removed by Join Filter: 340623
2. 22.632 35.680 ↑ 1.0 32,045 1

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

3. 13.048 13.048 ↑ 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=67) (actual time=0.010..13.048 rows=32,045 loops=1)

4. 37.073 92.006 ↓ 11.5 368,074 1

Materialize (cost=487.61..4,991.39 rows=32,045 width=92) (actual time=3.767..92.006 rows=368,074 loops=1)

5. 25.058 54.933 ↑ 1.0 32,045 1

WindowAgg (cost=487.61..4,590.83 rows=32,045 width=136) (actual time=3.764..54.933 rows=32,045 loops=1)

6. 9.569 29.875 ↑ 1.0 32,045 1

Merge Join (cost=487.61..3,949.93 rows=32,045 width=96) (actual time=3.750..29.875 rows=32,045 loops=1)

  • Merge Cond: (schds_1.schedule_id = schd.schedule_id)
7. 14.284 14.284 ↑ 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=60) (actual time=0.007..14.284 rows=32,045 loops=1)

8. 3.511 6.022 ↓ 7.0 32,040 1

Sort (cost=487.32..498.80 rows=4,589 width=36) (actual time=3.739..6.022 rows=32,040 loops=1)

  • Sort Key: schd.schedule_id
  • Sort Method: quicksort Memory: 551kB
9. 1.593 2.511 ↑ 1.0 4,589 1

Hash Join (cost=38.23..208.22 rows=4,589 width=36) (actual time=0.308..2.511 rows=4,589 loops=1)

  • Hash Cond: (schd.carrier_id = car.carrier_id)
10. 0.625 0.625 ↑ 1.0 4,589 1

Seq Scan on schedule schd (cost=0.00..157.89 rows=4,589 width=32) (actual time=0.007..0.625 rows=4,589 loops=1)

11. 0.129 0.293 ↑ 1.0 988 1

Hash (cost=25.88..25.88 rows=988 width=12) (actual time=0.293..0.293 rows=988 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
12. 0.164 0.164 ↑ 1.0 988 1

Seq Scan on carrier car (cost=0.00..25.88 rows=988 width=12) (actual time=0.006..0.164 rows=988 loops=1)

Planning time : 0.818 ms
Execution time : 195.075 ms