explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qi5t

Settings
# exclusive inclusive rows x rows loops node
1. 0.504 39.840 ↑ 1.2 661 1

Hash Anti Join (cost=365.30..22,322.61 rows=808 width=183) (actual time=4.882..39.840 rows=661 loops=1)

  • Hash Cond: (parent.id = child.root_workflow_id)
  • Buffers: shared hit=26421 read=20
2. 6.353 35.160 ↓ 1.0 867 1

Nested Loop (cost=0.70..21,932.57 rows=856 width=187) (actual time=0.361..35.160 rows=867 loops=1)

  • Buffers: shared hit=26139 read=20
3. 1.567 1.567 ↑ 1.0 4,540 1

Seq Scan on nflow_workflow w (cost=0.00..327.40 rows=4,540 width=183) (actual time=0.006..1.567 rows=4,540 loops=1)

  • Buffers: shared hit=282
4. 9.080 27.240 ↓ 0.0 0 4,540

Bitmap Heap Scan on nflow_workflow parent (cost=0.70..4.75 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=4,540)

  • 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=25857 read=20
5. 0.000 18.160 ↓ 0.0 0 4,540

BitmapOr (cost=0.70..0.70 rows=2 width=0) (actual time=0.004..0.004 rows=0 loops=4,540)

  • Buffers: shared hit=17339 read=20
6. 9.080 9.080 ↑ 1.0 1 4,540

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

  • Index Cond: (id = w.id)
  • Buffers: shared hit=9144 read=20
7. 9.080 9.080 ↑ 1.0 1 4,540

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

  • Index Cond: (id = w.root_workflow_id)
  • Buffers: shared hit=8195
8. 0.094 4.176 ↑ 1.8 137 1

Hash (cost=361.45..361.45 rows=252 width=4) (actual time=4.176..4.176 rows=137 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 5kB
  • Buffers: shared hit=282
9. 4.082 4.082 ↑ 1.8 143 1

Seq Scan on nflow_workflow child (cost=0.00..361.45 rows=252 width=4) (actual time=0.135..4.082 rows=143 loops=1)

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