explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 731.914 ↓ 92.0 92 1

Nested Loop (cost=1,000.85..52,486.15 rows=1 width=1,162) (actual time=112.033..731.914 rows=92 loops=1)

2. 2.998 722.400 ↓ 93.0 93 1

Gather (cost=1,000.42..52,480.85 rows=1 width=1,162) (actual time=112.009..722.400 rows=93 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
3. 639.378 719.402 ↓ 23.0 23 4

Nested Loop (cost=0.42..51,480.75 rows=1 width=1,162) (actual time=109.034..719.402 rows=23 loops=4)

4. 79.832 79.832 ↑ 1.4 3,312 4

Parallel Seq Scan on payment_outstanding po (cost=0.00..29,209.70 rows=4,663 width=8) (actual time=0.491..79.832 rows=3,312 loops=4)

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

Index Scan using reminder_mail_log_invoice_id_idx on reminder_mail_log rml (cost=0.42..4.77 rows=1 width=1,158) (actual time=0.192..0.192 rows=0 loops=13,247)

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

Index Scan using eos_user_client_code_id_index on eos_user eos (cost=0.42..5.28 rows=1 width=8) (actual time=0.093..0.109 rows=1 loops=93)

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