explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G6bC

Settings
# exclusive inclusive rows x rows loops node
1. 1.516 16.617 ↓ 3.0 685 1

Nested Loop Left Join (cost=126.25..7,453.34 rows=225 width=2,686) (actual time=1.823..16.617 rows=685 loops=1)

2. 0.485 14.416 ↓ 3.0 685 1

Hash Left Join (cost=126.12..5,580.76 rows=225 width=387) (actual time=1.799..14.416 rows=685 loops=1)

  • Hash Cond: (scn.currency_id = c.id)
3. 0.415 13.921 ↓ 3.0 685 1

Nested Loop Left Join (cost=124.98..5,578.61 rows=225 width=391) (actual time=1.768..13.921 rows=685 loops=1)

4. 0.507 8.711 ↓ 3.0 685 1

Hash Left Join (cost=124.55..3,742.63 rows=225 width=391) (actual time=0.823..8.711 rows=685 loops=1)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.779 7.599 ↓ 3.0 685 1

Nested Loop Left Join (cost=92.29..3,709.77 rows=225 width=377) (actual time=0.202..7.599 rows=685 loops=1)

6. 1.055 6.820 ↓ 3.0 685 1

Nested Loop Left Join (cost=92.15..3,673.21 rows=225 width=377) (actual time=0.196..6.820 rows=685 loops=1)

7. 0.524 5.080 ↓ 3.0 685 1

Hash Left Join (cost=91.87..3,529.12 rows=225 width=367) (actual time=0.185..5.080 rows=685 loops=1)

  • Hash Cond: (fi_si.originatordivision_id = od_db.id)
8. 0.772 4.468 ↓ 3.0 685 1

Nested Loop Left Join (cost=2.42..3,436.57 rows=225 width=345) (actual time=0.065..4.468 rows=685 loops=1)

9. 0.607 3.696 ↓ 3.0 685 1

Nested Loop (cost=1.99..1,580.78 rows=225 width=315) (actual time=0.059..3.696 rows=685 loops=1)

10. 0.203 2.573 ↓ 9.1 172 1

Nested Loop Left Join (cost=1.71..1,544.21 rows=19 width=172) (actual time=0.051..2.573 rows=172 loops=1)

11. 0.164 2.026 ↓ 9.1 172 1

Nested Loop (cost=1.29..1,535.39 rows=19 width=56) (actual time=0.042..2.026 rows=172 loops=1)

  • Join Filter: (nb.surplus_id = fi_si.id)
12. 0.246 1.346 ↓ 9.1 172 1

Nested Loop (cost=0.86..1,522.97 rows=19 width=56) (actual time=0.031..1.346 rows=172 loops=1)

13. 0.186 0.756 ↓ 1.2 172 1

Nested Loop (cost=0.43..1,457.55 rows=146 width=56) (actual time=0.021..0.756 rows=172 loops=1)

14. 0.054 0.054 ↑ 1.0 172 1

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (actual time=0.005..0.054 rows=172 loops=1)

15. 0.516 0.516 ↑ 1.0 1 172

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement fi_eps (cost=0.43..8.45 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=172)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
16. 0.344 0.344 ↑ 1.0 1 172

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement fi_ps_apfeps (cost=0.42..0.45 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=172)

  • Index Cond: (id = fi_eps.id)
17. 0.516 0.516 ↑ 1.0 1 172

Index Scan using supplierinvoice_pkey on supplierinvoice fi_si (cost=0.43..0.64 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=172)

  • Index Cond: (id = fi_eps.invoice_id)
18. 0.344 0.344 ↑ 1.0 1 172

Index Scan using apffinancingcontext_pkey on apffinancingcontext fi_ps_apffc_fc_afc (cost=0.42..0.46 rows=1 width=132) (actual time=0.002..0.002 rows=1 loops=172)

  • Index Cond: (id = fi_ps_apfeps.financingcontext_id)
19. 0.516 0.516 ↑ 1.0 4 172

Index Scan using suppliercreditnote_nettingbundle_idx on suppliercreditnote scn (cost=0.28..1.88 rows=4 width=151) (actual time=0.002..0.003 rows=4 loops=172)

  • Index Cond: (nettingbundle_id = nb.id)
20. 0.000 0.000 ↓ 0.0 0 685

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

  • Index Cond: (id = scn.referencedinvoice_id)
21. 0.011 0.088 ↑ 1.0 14 1

Hash (cost=89.28..89.28 rows=14 width=38) (actual time=0.088..0.088 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.015 0.077 ↑ 1.0 14 1

Nested Loop Left Join (cost=0.28..89.28 rows=14 width=38) (actual time=0.011..0.077 rows=14 loops=1)

23. 0.006 0.006 ↑ 1.0 14 1

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=28) (actual time=0.002..0.006 rows=14 loops=1)

24. 0.056 0.056 ↑ 1.0 1 14

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

  • Index Cond: (id = od_db.buyer_id)
25. 0.685 0.685 ↑ 1.0 1 685

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..0.64 rows=1 width=26) (actual time=0.001..0.001 rows=1 loops=685)

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

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt (cost=0.14..0.15 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=685)

  • Index Cond: (mapping_id = fi_eps.earlypaymentmapping_id)
27. 0.310 0.605 ↑ 1.0 945 1

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=0.605..0.605 rows=945 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
28. 0.295 0.295 ↑ 1.0 945 1

Seq Scan on earlypaymentadvice fi_eps_epa (cost=0.00..20.45 rows=945 width=30) (actual time=0.005..0.295 rows=945 loops=1)

29. 4.795 4.795 ↑ 1.0 1 685

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..8.16 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=685)

  • Index Cond: (scn.importbatch_id = id)
30. 0.005 0.010 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.010..0.010 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.005 0.005 ↑ 1.0 6 1

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.003..0.005 rows=6 loops=1)

32. 0.000 0.000 ↓ 0.0 0 685

Index Scan using invoicepaymentadvice_pkey on invoicepaymentadvice fi_ipa (cost=0.14..0.15 rows=1 width=1,052) (actual time=0.000..0.000 rows=0 loops=685)

  • Index Cond: (fi_si.paymentadvice_id = id)
33.          

SubPlan (for Nested Loop Left Join)

34. 0.685 0.685 ↑ 1.0 1 685

Aggregate (cost=8.15..8.16 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=685)

35. 0.000 0.000 ↓ 0.0 0 685

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt_1 (cost=0.14..8.15 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=685)

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 8.310 ms
Execution time : 17.054 ms