explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PIFg : huge plan 2

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.079 ↑ 1.0 1 1

Limit (cost=2.34..2.99 rows=1 width=1,301) (actual time=0.077..0.079 rows=1 loops=1)

2. 0.002 0.076 ↑ 179,998.0 1 1

Merge Left Join (cost=2.34..117,619.72 rows=179,998 width=1,301) (actual time=0.076..0.076 rows=1 loops=1)

  • Merge Cond: ("d.Task".id = "d.Task.SaleTaxCommitmentRequest".task_id)
3. 0.003 0.065 ↑ 179,998.0 1 1

Merge Left Join (cost=1.54..107,131.84 rows=179,998 width=1,182) (actual time=0.065..0.065 rows=1 loops=1)

  • Merge Cond: ("d.Task".id = "d.Task.RefundTaxCommitmentRequest".task_id)
4. 0.003 0.038 ↑ 179,998.0 1 1

Nested Loop (cost=0.84..98,589.53 rows=179,998 width=311) (actual time=0.037..0.038 rows=1 loops=1)

5. 0.013 0.013 ↑ 179,998.0 1 1

Index Scan using "IX_task_commitment_document_task_id" on task_commitment_document d (cost=0.42..10,010.48 rows=179,998 width=110) (actual time=0.013..0.013 rows=1 loops=1)

  • Filter: (((updated_on > '2019-07-03 00:00:00'::timestamp without time zone) OR ((updated_on = '2019-07-03 00:00:00'::timestamp without time zone) AND (id > 1602))) AND (updated_on < timezone('UTC'::text, now())))
6. 0.022 0.022 ↑ 1.0 1 1

Index Scan using pk_document_task on document_task "d.Task" (cost=0.42..0.49 rows=1 width=201) (actual time=0.022..0.022 rows=1 loops=1)

  • Index Cond: (id = d.task_id)
  • Filter: ((company_id)::text = '10000'::text)
7. 0.006 0.024 ↑ 2,000.0 1 1

Materialize (cost=0.70..8,067.54 rows=2,000 width=871) (actual time=0.024..0.024 rows=1 loops=1)

8. 0.002 0.018 ↑ 2,000.0 1 1

Nested Loop Left Join (cost=0.70..8,062.54 rows=2,000 width=871) (actual time=0.018..0.018 rows=1 loops=1)

9. 0.009 0.009 ↑ 2,000.0 1 1

Index Scan using pk_refund_tax_commitment_request on refund_tax_commitment_request "d.Task.RefundTaxCommitmentRequest" (cost=0.28..95.54 rows=2,000 width=670) (actual time=0.009..0.009 rows=1 loops=1)

10. 0.007 0.007 ↑ 1.0 1 1

Index Scan using pk_document_task on document_task "d.Task.RefundTaxCommitmentRequest.TaskToRefund" (cost=0.42..3.98 rows=1 width=201) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: ("d.Task.RefundTaxCommitmentRequest".task_id_to_refund = id)
11. 0.009 0.009 ↑ 180,137.0 1 1

Index Scan using pk_sale_tax_commitment_request on sale_tax_commitment_request "d.Task.SaleTaxCommitmentRequest" (cost=0.42..8,110.51 rows=180,137 width=119) (actual time=0.009..0.009 rows=1 loops=1)

Planning time : 1.298 ms
Execution time : 0.222 ms