explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t7e8

Settings
# exclusive inclusive rows x rows loops node
1. 25.369 165.420 ↓ 171.6 27,456 1

Hash Join (cost=6,048.36..11,369.32 rows=160 width=143) (actual time=100.619..165.420 rows=27,456 loops=1)

  • Hash Cond: ((rs.schedule_id = ls.schedule_id) AND (rs.idx = ls.idx))
2. 3.905 39.580 ↑ 1.0 32,045 1

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

3. 21.269 35.675 ↑ 1.0 32,045 1

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

4. 14.406 14.406 ↑ 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.009..14.406 rows=32,045 loops=1)

5. 13.350 100.471 ↑ 1.0 32,045 1

Hash (cost=5,097.40..5,097.40 rows=32,045 width=92) (actual time=100.471..100.471 rows=32,045 loops=1)

  • Buckets: 32768 Batches: 2 Memory Usage: 2434kB
6. 4.139 87.121 ↑ 1.0 32,045 1

Subquery Scan on ls (cost=3,975.82..5,097.40 rows=32,045 width=92) (actual time=59.345..87.121 rows=32,045 loops=1)

7. 18.620 82.982 ↑ 1.0 32,045 1

WindowAgg (cost=3,975.82..4,776.95 rows=32,045 width=136) (actual time=59.344..82.982 rows=32,045 loops=1)

8. 35.695 64.362 ↑ 1.0 32,045 1

Sort (cost=3,975.82..4,055.93 rows=32,045 width=96) (actual time=59.328..64.362 rows=32,045 loops=1)

  • Sort Key: car.carrier_id, schds_1.schedule_id, schds_1.elapse_time
  • Sort Method: external merge Disk: 3712kB
9. 7.068 28.667 ↑ 1.0 32,045 1

Hash Join (cost=253.48..1,577.60 rows=32,045 width=96) (actual time=2.458..28.667 rows=32,045 loops=1)

  • Hash Cond: (schd.carrier_id = car.carrier_id)
10. 8.494 21.302 ↑ 1.0 32,045 1

Hash Join (cost=215.25..1,454.90 rows=32,045 width=92) (actual time=2.149..21.302 rows=32,045 loops=1)

  • Hash Cond: (schds_1.schedule_id = schd.schedule_id)
11. 10.680 10.680 ↑ 1.0 32,045 1

Seq Scan on schedule_stop schds_1 (cost=0.00..1,155.45 rows=32,045 width=60) (actual time=0.004..10.680 rows=32,045 loops=1)

12. 0.777 2.128 ↑ 1.0 4,589 1

Hash (cost=157.89..157.89 rows=4,589 width=32) (actual time=2.128..2.128 rows=4,589 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 350kB
13. 1.351 1.351 ↑ 1.0 4,589 1

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

14. 0.128 0.297 ↑ 1.0 988 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
15. 0.169 0.169 ↑ 1.0 988 1

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

Planning time : 0.665 ms
Execution time : 167.305 ms