explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ve1i

Settings
# exclusive inclusive rows x rows loops node
1. 0.119 5.061 ↓ 266.0 266 1

HashAggregate (cost=1,676.17..1,676.18 rows=1 width=4) (actual time=5.041..5.061 rows=266 loops=1)

2. 0.195 4.942 ↓ 284.0 284 1

Nested Loop Left Join (cost=112.81..1,676.17 rows=1 width=4) (actual time=3.607..4.942 rows=284 loops=1)

  • Filter: (id.invoice_id IS NULL)
  • Rows Removed by Filter: 76
3. 0.233 4.033 ↓ 1.3 357 1

Hash Join (cost=112.39..271.89 rows=265 width=8) (actual time=3.585..4.033 rows=357 loops=1)

  • Hash Cond: (rad.returnsauthorisation_id = ra.returnsauthorisation_id)
4. 0.249 0.249 ↑ 12.0 427 1

Index Scan using returnsauthorisationdetail_cancelled_null_recieved_null_idx on returnsauthorisationdetail rad (cost=0.27..118.68 rows=5,126 width=8) (actual time=0.019..0.249 rows=427 loops=1)

5. 0.786 3.551 ↑ 1.0 4,013 1

Hash (cost=60.99..60.99 rows=4,090 width=4) (actual time=3.551..3.551 rows=4,013 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 142kB
6. 2.765 2.765 ↑ 1.0 4,013 1

Index Scan using returnsauthorisation_creditstatusoverride_true_idx on returnsauthorisation ra (cost=0.28..60.99 rows=4,090 width=4) (actual time=0.029..2.765 rows=4,013 loops=1)

  • Index Cond: (creditstatusoverride = true)
7. 0.714 0.714 ↓ 0.0 0 357

Index Scan using invoicedetail_detailnumber_creditreason_id_notnull_dix on invoicedetail id (cost=0.42..5.29 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=357)

  • Index Cond: ((rad.detailnumber = detailnumber) AND (creditreason_id IS NOT NULL))
Total runtime : 5.168 ms