explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lb72

Settings
# exclusive inclusive rows x rows loops node
1. 0.396 26.806 ↑ 1.2 582 1

Hash Anti Join (cost=364.81..21,629.19 rows=678 width=182) (actual time=2.593..26.806 rows=582 loops=1)

  • Hash Cond: (parent.id = child.root_workflow_id)
  • Buffers: shared hit=25828 read=20
2. 5.562 24.292 ↓ 1.1 776 1

Nested Loop (cost=0.71..21,242.39 rows=721 width=186) (actual time=0.267..24.292 rows=776 loops=1)

  • Buffers: shared hit=25544 read=20
3. 1.166 1.166 ↑ 1.0 4,391 1

Seq Scan on nflow_workflow w (cost=0.00..327.91 rows=4,391 width=182) (actual time=0.005..1.166 rows=4,391 loops=1)

  • Buffers: shared hit=284
4. 4.391 17.564 ↓ 0.0 0 4,391

Bitmap Heap Scan on nflow_workflow parent (cost=0.71..4.75 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=4,391)

  • Recheck Cond: ((id = w.id) OR (id = w.root_workflow_id))
  • Filter: ((next_activation IS NULL) AND (root_workflow_id IS NULL) AND (modified <= (now() - '1 day'::interval)))
  • Rows Removed by Filter: 2
  • Buffers: shared hit=25260 read=20
5. 4.391 13.173 ↓ 0.0 0 4,391

BitmapOr (cost=0.71..0.71 rows=2 width=0) (actual time=0.003..0.003 rows=0 loops=4,391)

  • Buffers: shared hit=16871 read=20
6. 4.391 4.391 ↑ 1.0 1 4,391

Bitmap Index Scan on nflow_workflow_pkey (cost=0.00..0.35 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=4,391)

  • Index Cond: (id = w.id)
  • Buffers: shared hit=8845 read=20
7. 4.391 4.391 ↑ 1.0 1 4,391

Bitmap Index Scan on nflow_workflow_pkey (cost=0.00..0.35 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=4,391)

  • Index Cond: (id = w.root_workflow_id)
  • Buffers: shared hit=8026
8. 0.049 2.118 ↑ 1.8 146 1

Hash (cost=360.84..360.84 rows=261 width=4) (actual time=2.118..2.118 rows=146 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 6kB
  • Buffers: shared hit=284
9. 2.069 2.069 ↑ 1.6 161 1

Seq Scan on nflow_workflow child (cost=0.00..360.84 rows=261 width=4) (actual time=0.085..2.069 rows=161 loops=1)

  • Filter: ((modified > (now() - '1 day'::interval)) OR (next_activation IS NOT NULL))
  • Rows Removed by Filter: 4230
  • Buffers: shared hit=284