explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h6JT : Optimization for: Optimization for: Optimization for: Optimization for: plan #88f1; plan #8l1n; plan #WF1s; plan #IQfk

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 39.493 7,919.265 ↓ 1.0 82,239 1

Nested Loop (cost=0.87..668,685.08 rows=81,186 width=8) (actual time=661.191..7,919.265 rows=82,239 loops=1)

  • JIT:
  • Functions: 9
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 0.567 ms, Inlining 2.803 ms, Optimization 32.536 ms, Emission 23.198 ms, Total 59.104 ms
2. 297.396 7,797.187 ↓ 1.0 82,585 1

Subquery Scan on latest_status (cost=0.43..519,085.11 rows=81,186 width=8) (actual time=661.166..7,797.187 rows=82,585 loops=1)

  • Filter: (latest_status.status = ANY ('{51,400,407,410,411,420}'::integer[]))
  • Rows Removed by Filter: 4,035,379
3. 313.548 7,499.791 ↓ 1.5 4,117,964 1

Result (cost=0.43..471,726.81 rows=2,706,189 width=20) (actual time=58.654..7,499.791 rows=4,117,964 loops=1)

4. 1,119.756 7,186.243 ↓ 1.5 4,117,964 1

Unique (cost=0.43..471,726.81 rows=2,706,189 width=20) (actual time=0.010..7,186.243 rows=4,117,964 loops=1)

5. 6,066.487 6,066.487 ↓ 1.0 13,875,734 1

Index Scan using campaigns_actionworkflowitemstatus_awi_created_at_idx on campaigns_actionworkflowitemstatus campaigns_actionworkflowitemstatus_1 (cost=0.43..437,037.47 rows=13,875,733 width=20) (actual time=0.009..6,066.487 rows=13,875,734 loops=1)

6. 82.585 82.585 ↑ 1.0 1 82,585

Index Scan using campaigns_actionworkflowitemstatus_pkey on campaigns_actionworkflowitemstatus (cost=0.43..1.84 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=82,585)

  • Index Cond: (id = latest_status.action_workflow_item_id)
Planning time : 0.132 ms
Execution time : 7,922.957 ms