explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vc6x : Optimization for: Optimization for: Optimization for: plan #uB1; plan #hi0S; plan #iUdW

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 4.564 163.487 ↓ 116.0 116 1

Gather (cost=1,000.85..52,539.40 rows=1 width=1,162) (actual time=67.334..163.487 rows=116 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
2. 0.221 158.923 ↓ 29.0 29 4

Nested Loop (cost=0.85..51,539.30 rows=1 width=1,162) (actual time=64.293..158.923 rows=29 loops=4)

3. 96.116 158.696 ↓ 2.6 29 4

Nested Loop (cost=0.42..51,456.11 rows=11 width=1,158) (actual time=64.276..158.696 rows=29 loops=4)

4. 62.552 62.552 ↑ 1.4 3,323 4

Parallel Seq Scan on payment_outstanding po (cost=0.00..29,199.84 rows=4,662 width=4) (actual time=0.422..62.552 rows=3,323 loops=4)

  • Filter: (active AND (outstanding_amount > '0'::double precision) AND (entity_type = 'invoice'::payment_outstanding_entity_type))
  • Rows Removed by Filter: 434788
5. 0.028 0.028 ↓ 0.0 0 13,293

Index Scan using reminder_mail_log_invoice_id_idx on reminder_mail_log rml (cost=0.42..4.76 rows=1 width=1,158) (actual time=0.028..0.028 rows=0 loops=13,293)

  • Index Cond: (invoice_id = po.invoice_payment_note_id)
  • Filter: (active AND ((status)::integer <> 3) AND ((((reminder_1 ->> 'sent_date'::text) < '2019-08-13 23:59:59'::text) AND ((status)::integer = 0)) OR (((reminder_2 ->> 'sent_date'::text) < '2019-08-13 23:59:59'::text) AND ((status)::integer = 1))))
  • Rows Removed by Filter: 1
6. 0.006 0.006 ↑ 1.0 1 117

Index Scan using eos_user_client_code_id_index on eos_user eos (cost=0.42..7.55 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=117)

  • Index Cond: (client_code_id = rml.client_code_id)
  • Filter: (active AND ((roles -> 'roles'::text) @> '["23"]'::jsonb))
  • Rows Removed by Filter: 0
Planning time : 0.497 ms
Execution time : 163.577 ms