explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Quwb0

Settings
# exclusive inclusive rows x rows loops node
1. 0.760 33.633 ↓ 6.0 426 1

Nested Loop (cost=3.26..25,937.75 rows=71 width=3,082) (actual time=4.809..33.633 rows=426 loops=1)

  • Join Filter: (lineitemnettingbundle.surplus_id = surplusinvoice.id)
2. 0.600 32.021 ↓ 5.8 426 1

Nested Loop (cost=2.83..25,889.71 rows=74 width=1,338) (actual time=4.788..32.021 rows=426 loops=1)

3. 0.344 29.291 ↑ 4.3 426 1

Nested Loop (cost=2.41..25,088.08 rows=1,826 width=1,346) (actual time=4.155..29.291 rows=426 loops=1)

4. 0.444 19.575 ↑ 4.9 426 1

Merge Join (cost=1.97..7,453.43 rows=2,096 width=1,330) (actual time=1.036..19.575 rows=426 loops=1)

  • Merge Cond: (creditnote.nettingbundle_id = lineitemnettingbundle.id)
5. 0.525 18.952 ↑ 4.9 427 1

Nested Loop Left Join (cost=1.70..36,489.61 rows=2,096 width=1,322) (actual time=1.023..18.952 rows=427 loops=1)

6. 0.476 18.427 ↑ 4.9 427 1

Nested Loop Left Join (cost=1.27..19,266.63 rows=2,096 width=1,292) (actual time=1.019..18.427 rows=427 loops=1)

  • Join Filter: (creditnote.currency_id = lineitemcurrency.id)
7. 0.371 17.951 ↑ 4.9 427 1

Nested Loop Left Join (cost=1.27..19,099.35 rows=2,096 width=784) (actual time=1.012..17.951 rows=427 loops=1)

8. 0.426 5.624 ↑ 4.9 427 1

Nested Loop Left Join (cost=0.84..1,996.15 rows=2,096 width=784) (actual time=0.059..5.624 rows=427 loops=1)

9. 2.148 4.344 ↑ 4.9 427 1

Nested Loop (cost=0.56..654.19 rows=2,096 width=774) (actual time=0.054..4.344 rows=427 loops=1)

  • Join Filter: (lineitemdivision.id = creditnote.originatordivision_id)
  • Rows Removed by Join Filter: 5539
10. 0.915 0.915 ↑ 4.9 427 1

Index Scan using suppliercreditnote_nettingbundle_idx on suppliercreditnote creditnote (cost=0.28..124.72 rows=2,096 width=158) (actual time=0.009..0.915 rows=427 loops=1)

11. 1.194 1.281 ↑ 1.0 14 427

Materialize (cost=0.28..89.35 rows=14 width=632) (actual time=0.000..0.003 rows=14 loops=427)

12. 0.034 0.087 ↑ 1.0 14 1

Nested Loop Left Join (cost=0.28..89.28 rows=14 width=632) (actual time=0.013..0.087 rows=14 loops=1)

13. 0.011 0.011 ↑ 1.0 14 1

Seq Scan on divisionbase lineitemdivision (cost=0.00..1.14 rows=14 width=622) (actual time=0.004..0.011 rows=14 loops=1)

14. 0.042 0.042 ↑ 1.0 1 14

Index Scan using corporatebase_pkey on corporatebase lineitembuyer (cost=0.28..6.29 rows=1 width=26) (actual time=0.003..0.003 rows=1 loops=14)

  • Index Cond: (id = lineitemdivision.buyer_id)
15. 0.854 0.854 ↑ 1.0 1 427

Index Scan using corporatebase_pkey on corporatebase lineitemsupplier (cost=0.28..0.64 rows=1 width=26) (actual time=0.002..0.002 rows=1 loops=427)

  • Index Cond: (id = creditnote.supplier_id)
16. 11.956 11.956 ↑ 1.0 1 427

Index Scan using arpimportbatch_pkey on arpimportbatch lineitemimportbatch (cost=0.43..8.16 rows=1 width=16) (actual time=0.028..0.028 rows=1 loops=427)

  • Index Cond: (creditnote.importbatch_id = id)
17. 0.000 0.000 ↑ 6.0 1 427

Materialize (cost=0.00..1.09 rows=6 width=524) (actual time=0.000..0.000 rows=1 loops=427)

18. 0.003 0.003 ↑ 6.0 1 1

Seq Scan on crxcurrency lineitemcurrency (cost=0.00..1.06 rows=6 width=524) (actual time=0.003..0.003 rows=1 loops=1)

19. 0.000 0.000 ↓ 0.0 0 427

Index Scan using supplierinvoice_pkey on supplierinvoice referencedinvoice (cost=0.43..8.21 rows=1 width=38) (actual time=0.000..0.000 rows=0 loops=427)

  • Index Cond: (id = creditnote.referencedinvoice_id)
20. 0.179 0.179 ↑ 1.0 410 1

Index Scan using nettingbundle_pkey on nettingbundle lineitemnettingbundle (cost=0.27..29.42 rows=410 width=16) (actual time=0.009..0.179 rows=410 loops=1)

21. 9.372 9.372 ↑ 1.0 1 426

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement financedinvoiceeps (cost=0.43..8.41 rows=1 width=16) (actual time=0.022..0.022 rows=1 loops=426)

  • Index Cond: (invoice_id = lineitemnettingbundle.surplus_id)
  • Filter: (creationdate >= '2018-10-11'::date)
22. 2.130 2.130 ↑ 1.0 1 426

Index Only Scan using ddearlypaymentsettlement_pkey on ddearlypaymentsettlement financedinvoiceddeps (cost=0.42..0.44 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=426)

  • Index Cond: (id = financedinvoiceeps.id)
  • Heap Fetches: 426
23. 0.852 0.852 ↑ 1.0 1 426

Index Only Scan using supplierinvoice_pkey on supplierinvoice surplusinvoice (cost=0.43..0.64 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=426)

  • Index Cond: (id = financedinvoiceeps.invoice_id)
  • Heap Fetches: 426
Planning time : 18.442 ms
Execution time : 33.871 ms