explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

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

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

2. 5.307 172.279 ↓ 93.0 93 1

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

  • Workers Planned: 3
  • Workers Launched: 3
3. 103.349 166.972 ↓ 23.0 23 4

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

4. 63.593 63.593 ↑ 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.245..63.593 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.030 0.030 ↓ 0.0 0 13,248

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.030..0.030 rows=0 loops=13,248)

  • 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. 0.465 0.465 ↑ 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.004..0.005 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 : 0.746 ms
Execution time : 172.927 ms