explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cA4u

Settings
# exclusive inclusive rows x rows loops node
1. 0.089 29.207 ↓ 0.0 0 1

Hash Anti Join (cost=424.33..31,668.39 rows=812 width=183) (actual time=29.207..29.207 rows=0 loops=1)

  • Hash Cond: (parent.id = child.root_workflow_id)
  • Buffers: shared hit=28570 read=20
2. 2.290 26.286 ↑ 5.3 164 1

Nested Loop (cost=0.67..31,186.41 rows=864 width=187) (actual time=0.280..26.286 rows=164 loops=1)

  • Buffers: shared hit=28288 read=20
3. 1.136 1.136 ↑ 1.4 4,572 1

Seq Scan on nflow_workflow w (cost=0.00..347.32 rows=6,532 width=183) (actual time=0.005..1.136 rows=4,572 loops=1)

  • Buffers: shared hit=282
4. 9.144 22.860 ↓ 0.0 0 4,572

Bitmap Heap Scan on nflow_workflow parent (cost=0.67..4.71 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=4,572)

  • 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() - '30 days'::interval)))
  • Rows Removed by Filter: 2
  • Buffers: shared hit=28006 read=20
5. 4.572 13.716 ↓ 0.0 0 4,572

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

  • Buffers: shared hit=17468 read=20
6. 4.572 4.572 ↑ 1.0 1 4,572

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

  • Index Cond: (id = w.id)
  • Buffers: shared hit=9208 read=20
7. 4.572 4.572 ↓ 3.0 3 4,572

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

  • Index Cond: (id = w.root_workflow_id)
  • Buffers: shared hit=8260
8. 0.422 2.832 ↑ 2.1 1,058 1

Hash (cost=396.31..396.31 rows=2,188 width=4) (actual time=2.832..2.832 rows=1,058 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 38kB
  • Buffers: shared hit=282
9. 2.410 2.410 ↑ 1.5 1,456 1

Seq Scan on nflow_workflow child (cost=0.00..396.31 rows=2,188 width=4) (actual time=0.024..2.410 rows=1,456 loops=1)

  • Filter: ((modified > (now() - '30 days'::interval)) OR (next_activation IS NOT NULL))
  • Rows Removed by Filter: 3116
  • Buffers: shared hit=282