explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qQjs

Settings
# exclusive inclusive rows x rows loops node
1. 235.851 1,570.471 ↓ 1.1 202,640 1

Merge Anti Join (cost=76,079.24..77,257.34 rows=188,810 width=4) (actual time=1,198.485..1,570.471 rows=202,640 loops=1)

  • Merge Cond: (parent.id = child.root_workflow_id)
  • Buffers: shared hit=36374
2. 261.580 679.577 ↓ 1.0 206,404 1

Sort (cost=45,530.63..46,038.42 rows=203,116 width=4) (actual time=545.873..679.577 rows=206,404 loops=1)

  • Sort Key: parent.id
  • Sort Method: quicksort Memory: 15820kB
  • Buffers: shared hit=18187
3. 417.997 417.997 ↓ 1.0 206,404 1

Seq Scan on nflow_workflow parent (cost=0.00..27,623.98 rows=203,116 width=4) (actual time=0.012..417.997 rows=206,404 loops=1)

  • Filter: ((next_activation IS NULL) AND (root_workflow_id IS NULL) AND (modified <= (now() - '1 day'::interval)))
  • Rows Removed by Filter: 333579
  • Buffers: shared hit=18187
4. 19.986 655.043 ↑ 4.3 8,763 1

Sort (cost=30,513.09..30,608.04 rows=37,982 width=4) (actual time=651.671..655.043 rows=8,763 loops=1)

  • Sort Key: child.root_workflow_id
  • Sort Method: quicksort Memory: 2031kB
  • Buffers: shared hit=18187
5. 635.057 635.057 ↑ 1.2 31,333 1

Seq Scan on nflow_workflow child (cost=0.00..27,623.98 rows=37,982 width=4) (actual time=0.031..635.057 rows=31,333 loops=1)

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