explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c50P

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 5.729 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.97..18,208.25 rows=45 width=2,686) (actual time=5.729..5.729 rows=0 loops=1)

  • Join Filter: (fi_si.paymentadvice_id = fi_ipa.id)
2. 0.000 5.728 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.97..17,823.72 rows=45 width=387) (actual time=5.728..5.728 rows=0 loops=1)

  • Join Filter: (bpt.mapping_id = fi_eps.earlypaymentmapping_id)
3. 0.001 5.728 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.97..17,806.85 rows=45 width=387) (actual time=5.728..5.728 rows=0 loops=1)

4. 0.001 5.727 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.70..17,793.68 rows=45 width=373) (actual time=5.727..5.727 rows=0 loops=1)

5. 0.000 5.726 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.28..17,772.79 rows=45 width=257) (actual time=5.726..5.726 rows=0 loops=1)

  • Join Filter: (scn.currency_id = c.id)
6. 0.001 5.726 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.28..17,768.18 rows=45 width=261) (actual time=5.726..5.726 rows=0 loops=1)

7. 0.001 5.725 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.84..17,400.98 rows=45 width=261) (actual time=5.725..5.725 rows=0 loops=1)

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
8. 0.000 5.724 ↓ 0.0 0 1

Nested Loop (cost=1.57..17,302.22 rows=45 width=239) (actual time=5.724..5.724 rows=0 loops=1)

  • Join Filter: (scn.referencedinvoice_id = fi_si.id)
9. 0.001 5.724 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.14..17,301.57 rows=1 width=201) (actual time=5.723..5.724 rows=0 loops=1)

10. 0.001 5.723 ↓ 0.0 0 1

Nested Loop (cost=0.86..17,300.93 rows=1 width=191) (actual time=5.723..5.723 rows=0 loops=1)

  • Join Filter: (fi_ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
11. 0.001 5.722 ↓ 0.0 0 1

Nested Loop (cost=0.86..17,299.63 rows=1 width=199) (actual time=5.722..5.722 rows=0 loops=1)

12. 1.471 5.721 ↓ 0.0 0 1

Nested Loop (cost=0.43..17,299.18 rows=1 width=191) (actual time=5.721..5.721 rows=0 loops=1)

13. 4.250 4.250 ↑ 1.0 2,096 1

Seq Scan on suppliercreditnote scn (cost=0.00..78.96 rows=2,096 width=151) (actual time=0.687..4.250 rows=2,096 loops=1)

14. 0.000 0.000 ↓ 0.0 0 2,096

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement fi_eps (cost=0.43..8.21 rows=1 width=40) (actual time=0.000..0.000 rows=0 loops=2,096)

  • Index Cond: (invoice_id = scn.referencedinvoice_id)
  • Filter: (creationdate >= '2019-01-01'::date)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement fi_ps_apfeps (cost=0.42..0.45 rows=1 width=24) (never executed)

  • Index Cond: (id = fi_eps.id)
16. 0.000 0.000 ↓ 0.0 0

Seq Scan on apfdebtoragreement ps_apfeps_t_apfda (cost=0.00..1.25 rows=4 width=8) (never executed)

  • Filter: (buyer_id = 67002626)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..0.64 rows=1 width=26) (never executed)

  • Index Cond: (id = scn.supplier_id)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using supplierinvoice_pkey on supplierinvoice fi_si (cost=0.43..0.64 rows=1 width=54) (never executed)

  • Index Cond: (id = fi_eps.invoice_id)
  • Filter: (nettingbundle_id IS NULL)
19. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.28..89.35 rows=14 width=38) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.28..89.28 rows=14 width=38) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=28) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Index Scan using corporatebase_pkey on corporatebase od_c_cb (cost=0.28..6.29 rows=1 width=26) (never executed)

  • Index Cond: (id = od_db.buyer_id)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..8.16 rows=1 width=16) (never executed)

  • Index Cond: (scn.importbatch_id = id)
24. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.09 rows=6 width=12) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Index Scan using apffinancingcontext_pkey on apffinancingcontext fi_ps_apffc_fc_afc (cost=0.42..0.46 rows=1 width=132) (never executed)

  • Index Cond: (id = fi_ps_apfeps.financingcontext_id)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using earlypaymentadvice_pkey on earlypaymentadvice fi_eps_epa (cost=0.28..0.29 rows=1 width=30) (never executed)

  • Index Cond: (id = fi_eps.earlypaymentadvice_id)
28. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..10.15 rows=10 width=16) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Seq Scan on bankpaymenttransaction bpt (cost=0.00..10.10 rows=10 width=16) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..10.15 rows=10 width=1,052) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Seq Scan on invoicepaymentadvice fi_ipa (cost=0.00..10.10 rows=10 width=1,052) (never executed)

32.          

SubPlan (for Nested Loop Left Join)

33. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.15..8.16 rows=1 width=8) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt_1 (cost=0.14..8.15 rows=1 width=8) (never executed)

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 9.845 ms
Execution time : 5.981 ms