explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jn8n

Settings
# exclusive inclusive rows x rows loops node
1. 897.719 18,941.518 ↓ 1.3 458,388 1

Merge Join (cost=8,988,323.23..8,990,432.98 rows=343,190 width=186) (actual time=17,597.122..18,941.518 rows=458,388 loops=1)

  • Buffers: shared hit=3805758 read=6
2. 3,100.689 16,729.350 ↓ 1.3 469,470 1

Sort (cost=8,955,838.05..8,956,757.33 rows=367,712 width=190) (actual time=16,310.999..16,729.35 rows=469,470 loops=1)

  • Sort Key: parent.id
  • Sort Method: quicksort Memory: 136991kB
  • Buffers: shared hit=3787571 read=6
3. 2,455.801 13,628.661 ↓ 1.3 469,470 1

Nested Loop (cost=6.82..8,921,846.36 rows=367,712 width=190) (actual time=0.07..13,628.661 rows=469,470 loops=1)

  • Buffers: shared hit=3787571 read=6
4. 458.324 458.324 ↑ 1.0 595,252 1

Seq Scan on nflow_workflow w (cost=0..24,192.43 rows=600,543 width=186) (actual time=0.007..458.324 rows=595,252 loops=1)

  • Buffers: shared hit=18187
5. 2,976.260 10,714.536 ↑ 1.0 1 595,252

Bitmap Heap Scan on nflow_workflow parent (cost=6.82..14.81 rows=1 width=4) (actual time=0.018..0.018 rows=1 loops=595,252)

  • Filter: ((next_activation IS NULL) AND (root_workflow_id IS NULL) AND (modified <= (now() - '1 day'::interval)))
  • Buffers: shared hit=3769384 read=6
6. 1,785.756 7,738.276 ↓ 0.0 0 595,252

BitmapOr (cost=6.82..6.82 rows=2 width=0) (actual time=0.013..0.013 rows=0 loops=595,252)

  • Buffers: shared hit=2835486 read=6
7. 3,571.512 3,571.512 ↑ 1.0 1 595,252

Bitmap Index Scan on nflow_workflow_pkey (cost=0..3.41 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=595,252)

  • Index Cond: (id = w.id)
  • Buffers: shared hit=1795151 read=5
8. 2,381.008 2,381.008 ↑ 1.0 1 595,252

Bitmap Index Scan on nflow_workflow_pkey (cost=0..3.41 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=595,252)

  • Index Cond: (id = w.root_workflow_id)
  • Buffers: shared hit=1040335 read=1
9. 59.460 1,314.449 ↑ 3.7 13,110 1

Sort (cost=32,446.36..32,566.88 rows=48,208 width=4) (actual time=1,285.128..1,314.449 rows=13,110 loops=1)

  • Sort Key: child.root_workflow_id
  • Sort Method: quicksort Memory: 3019kB
  • Buffers: shared hit=18187
10. 1,254.989 1,254.989 ↑ 1.3 36,673 1

Seq Scan on nflow_workflow child (cost=0..28,696.5 rows=48,208 width=4) (actual time=0.026..1,254.989 rows=36,673 loops=1)

  • Filter: ((modified > (now() - '1 day'::interval)) OR (next_activation IS NOT NULL))
  • Buffers: shared hit=18187