explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h2TO

Settings
# exclusive inclusive rows x rows loops node
1. 4.681 39.951 ↑ 1.0 3,868 1

Hash Join (cost=689.40..794.69 rows=3,892 width=271) (actual time=23.436..39.951 rows=3,868 loops=1)

  • Hash Cond: (two.task_id = tsk.task_id)
  • Buffers: shared hit=293
2.          

CTE wrk

3. 11.026 15.242 ↑ 1.0 4,146 1

HashAggregate (cost=302.20..343.89 rows=4,169 width=52) (actual time=12.465..15.242 rows=4,146 loops=1)

  • Group Key: work.task_workflow_id
  • Buffers: shared hit=134
4. 4.216 4.216 ↑ 1.0 8,359 1

Seq Scan on work (cost=0.00..218.10 rows=8,410 width=100) (actual time=0.006..4.216 rows=8,359 loops=1)

  • Buffers: shared hit=134
5. 4.512 30.266 ↑ 1.0 4,146 1

Hash Join (cost=175.07..269.40 rows=4,169 width=188) (actual time=18.384..30.266 rows=4,146 loops=1)

  • Hash Cond: (wrk.task_workflow_id = two.task_workflow_id)
  • Buffers: shared hit=210
6. 19.889 19.889 ↑ 1.0 4,146 1

CTE Scan on wrk (cost=0.00..83.38 rows=4,169 width=52) (actual time=12.468..19.889 rows=4,146 loops=1)

  • Buffers: shared hit=134
7. 3.185 5.865 ↓ 1.0 4,415 1

Hash (cost=120.03..120.03 rows=4,403 width=140) (actual time=5.864..5.865 rows=4,415 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 649kB
  • Buffers: shared hit=76
8. 2.680 2.680 ↓ 1.0 4,415 1

Seq Scan on task_workflow two (cost=0.00..120.03 rows=4,403 width=140) (actual time=0.008..2.680 rows=4,415 loops=1)

  • Buffers: shared hit=76
9. 2.467 5.004 ↓ 1.0 3,770 1

Hash (cost=123.36..123.36 rows=3,767 width=87) (actual time=5.003..5.004 rows=3,770 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 527kB
  • Buffers: shared hit=83
10. 2.537 2.537 ↓ 1.0 3,770 1

Seq Scan on task tsk (cost=0.00..123.36 rows=3,767 width=87) (actual time=0.011..2.537 rows=3,770 loops=1)

  • Filter: (finish_time IS NOT NULL)
  • Rows Removed by Filter: 271
  • Buffers: shared hit=83
Planning time : 0.517 ms
Execution time : 42.149 ms