explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2,054.554 19,762.996 ↑ 20.7 82,615 1

Nested Loop (cost=356,360.39..356,848.25 rows=1,712,535 width=8) (actual time=4,064.045..19,762.996 rows=82,615 loops=1)

  • JIT:
  • Functions: 15
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 0.888 ms, Inlining 0.000 ms, Optimization 0.246 ms, Emission 4.589 ms, Total 5.723 ms
2. 2,618.244 5,354.550 ↓ 20,589.8 4,117,964 1

HashAggregate (cost=356,359.96..356,361.96 rows=200 width=8) (actual time=4,063.964..5,354.550 rows=4,117,964 loops=1)

  • Group Key: campaigns_actionworkflowitemstatus_1.id
3. 302.226 2,736.306 ↓ 1.5 4,117,964 1

Result (cost=0.56..322,533.03 rows=2,706,154 width=24) (actual time=4.947..2,736.306 rows=4,117,964 loops=1)

4. 851.436 2,434.080 ↓ 1.5 4,117,964 1

Unique (cost=0.56..322,533.03 rows=2,706,154 width=24) (actual time=0.016..2,434.080 rows=4,117,964 loops=1)

5. 1,582.644 1,582.644 ↓ 1.0 13,875,612 1

Index Only Scan using campaigns_actionworkflowitemstatus_awi_created_at_id_idx on campaigns_actionworkflowitemstatus campaigns_actionworkflowitemstatus_1 (cost=0.56..287,844.14 rows=13,875,557 width=24) (actual time=0.015..1,582.644 rows=13,875,612 loops=1)

  • Heap Fetches: 342,593
6. 12,353.892 12,353.892 ↓ 0.0 0 4,117,964

Index Scan using campaigns_actionworkflowitemstatus_pkey on campaigns_actionworkflowitemstatus (cost=0.43..2.66 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=4,117,964)

  • Index Cond: (id = campaigns_actionworkflowitemstatus_1.id)
  • Filter: (status = ANY ('{51,400,407,410,411,420}'::integer[]))
  • Rows Removed by Filter: 1
Planning time : 0.174 ms
Execution time : 19,789.947 ms