explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yGxn

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 848.096 ↑ 1.0 1 1

Limit (cost=38,434.40..38,434.40 rows=1 width=1,301) (actual time=848.093..848.096 rows=1 loops=1)

2. 188.089 848.091 ↑ 179,964.0 1 1

Sort (cost=38,434.40..38,884.31 rows=179,964 width=1,301) (actual time=848.091..848.091 rows=1 loops=1)

  • Sort Key: d.updated_on, d.id
  • Sort Method: top-N heapsort Memory: 25kB
3. 89.734 660.002 ↓ 1.0 180,000 1

Hash Left Join (cost=1,117.12..37,534.58 rows=179,964 width=1,301) (actual time=13.130..660.002 rows=180,000 loops=1)

  • Hash Cond: ("d.Task".id = "d.Task.RefundTaxCommitmentRequest".task_id)
4. 128.532 557.198 ↓ 1.0 180,000 1

Merge Left Join (cost=2.06..35,724.87 rows=179,964 width=430) (actual time=0.043..557.198 rows=180,000 loops=1)

  • Merge Cond: ("d.Task".id = "d.Task.SaleTaxCommitmentRequest".task_id)
5. 137.793 381.264 ↓ 1.0 180,000 1

Merge Join (cost=1.26..25,237.41 rows=179,964 width=311) (actual time=0.032..381.264 rows=180,000 loops=1)

  • Merge Cond: (d.task_id = "d.Task".id)
6. 163.495 163.495 ↓ 1.0 180,000 1

Index Scan using "IX_task_commitment_document_task_id" on task_commitment_document d (cost=0.42..17,018.49 rows=179,964 width=110) (actual time=0.012..163.495 rows=180,000 loops=1)

  • Filter: (((company_id)::text = '10000'::text) AND ((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())))
7. 79.976 79.976 ↓ 1.0 182,000 1

Index Scan using pk_document_task on document_task "d.Task" (cost=0.42..6,482.15 rows=181,980 width=201) (actual time=0.015..79.976 rows=182,000 loops=1)

8. 47.402 47.402 ↑ 1.0 180,000 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.010..47.402 rows=180,000 loops=1)

9. 1.036 13.070 ↑ 1.0 2,000 1

Hash (cost=1,090.06..1,090.06 rows=2,000 width=871) (actual time=13.070..13.070 rows=2,000 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 251kB
10. 2.702 12.034 ↑ 1.0 2,000 1

Merge Left Join (cost=802.09..1,090.06 rows=2,000 width=871) (actual time=8.326..12.034 rows=2,000 loops=1)

  • Merge Cond: ("d.Task.RefundTaxCommitmentRequest".task_id_to_refund = "d.Task.RefundTaxCommitmentRequest.TaskToRefund".id)
11. 0.783 0.783 ↑ 1.0 2,000 1

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

12. 8.549 8.549 ↑ 7.6 23,999 1

Index Scan using pk_document_task on document_task "d.Task.RefundTaxCommitmentRequest.TaskToRefund" (cost=0.42..6,482.15 rows=181,980 width=201) (actual time=0.009..8.549 rows=23,999 loops=1)

Planning time : 1.278 ms
Execution time : 848.410 ms