explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HuLz

Settings
# exclusive inclusive rows x rows loops node
1. 1.191 13.401 ↑ 1.0 1 1

Aggregate (cost=2,501.88..2,501.89 rows=1 width=16) (actual time=13.073..13.401 rows=1 loops=1)

  • Planning time: 0.268 ms
  • Execution time: 13.466 ms
2. 4.640 12.210 ↓ 2.7 1,011 1

Hash Right Join (cost=1,380.70..2,500.04 rows=369 width=8) (actual time=1.502..12.210 rows=1,011 loops=1)

  • Hash Cond: (st.task_id = t.id)
  • Filter: (((t.state)::text = 'completed'::text) OR ((st.state)::text = 'completed'::text))
  • Rows Removed by Filter: 34
3. 6.117 6.117 ↑ 1.0 23,882 1

Seq Scan on sub_tasks st (cost=0.00..1,027.82 rows=23,982 width=17) (actual time=0.009..6.117 rows=23,882 loops=1)

4. 0.071 1.453 ↑ 1.1 381 1

Hash (cost=1,375.63..1,375.63 rows=405 width=13) (actual time=1.453..1.453 rows=381 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
5. 1.209 1.382 ↑ 1.1 381 1

Bitmap Heap Scan on tasks t (cost=11.43..1,375.63 rows=405 width=13) (actual time=0.258..1.382 rows=381 loops=1)

  • Recheck Cond: (contractor_id = 6701)
  • Heap Blocks: exact=465
6. 0.173 0.173 ↓ 1.2 493 1

Bitmap Index Scan on index_tasks_on_contractor_id (cost=0.00..11.33 rows=405 width=0) (actual time=0.173..0.173 rows=493 loops=1)

  • Index Cond: (contractor_id = 6701)