explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IjzN

Settings
# exclusive inclusive rows x rows loops node
1. 0.393 27.265 ↑ 1.2 582 1

Hash Anti Join (cost=364.45..21,499.92 rows=674 width=182) (actual time=2.630..27.265 rows=582 loops=1)

  • Hash Cond: (parent.id = child.root_workflow_id)
  • Buffers: shared hit=25851 read=19
2. 1.842 24.761 ↓ 1.1 780 1

Nested Loop (cost=0.71..21,112.32 rows=719 width=186) (actual time=0.301..24.761 rows=780 loops=1)

  • Buffers: shared hit=25567 read=19
3. 1.104 1.104 ↑ 1.0 4,363 1

Seq Scan on nflow_workflow w (cost=0.00..327.63 rows=4,363 width=182) (actual time=0.005..1.104 rows=4,363 loops=1)

  • Buffers: shared hit=284
4. 8.726 21.815 ↓ 0.0 0 4,363

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

  • 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=25283 read=19
5. 4.363 13.089 ↓ 0.0 0 4,363

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

  • Buffers: shared hit=16759 read=19
6. 4.363 4.363 ↑ 1.0 1 4,363

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,363)

  • Index Cond: (id = w.id)
  • Buffers: shared hit=8790 read=19
7. 4.363 4.363 ↑ 1.0 1 4,363

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,363)

  • Index Cond: (id = w.root_workflow_id)
  • Buffers: shared hit=7969
8. 0.046 2.111 ↑ 1.9 146 1

Hash (cost=360.35..360.35 rows=271 width=4) (actual time=2.111..2.111 rows=146 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 6kB
  • Buffers: shared hit=284
9. 2.065 2.065 ↑ 1.7 159 1

Seq Scan on nflow_workflow child (cost=0.00..360.35 rows=271 width=4) (actual time=1.054..2.065 rows=159 loops=1)

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