explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5xg1

Settings
# exclusive inclusive rows x rows loops node
1. 6.398 129.807 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,161.80..1,394.24 rows=5 width=2,669) (actual time=15.818..129.807 rows=2,000 loops=1)

2. 1.915 117.409 ↓ 400.0 2,000 1

Hash Left Join (cost=1,161.67..1,351.81 rows=5 width=516) (actual time=15.786..117.409 rows=2,000 loops=1)

  • Hash Cond: ((fi_ps_abseps_t_absda.id = fi_ifca.absda_id) AND (fi_si.currency_id = fi_ifca.currency_id))
3. 2.860 115.414 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,159.95..1,350.03 rows=5 width=408) (actual time=15.682..115.414 rows=2,000 loops=1)

4. 2.641 108.554 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,159.66..1,348.45 rows=5 width=408) (actual time=15.667..108.554 rows=2,000 loops=1)

5. 2.238 105.913 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,159.52..1,347.64 rows=5 width=394) (actual time=15.659..105.913 rows=2,000 loops=1)

6. 1.915 101.675 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,159.38..1,346.88 rows=5 width=394) (actual time=15.643..101.675 rows=2,000 loops=1)

7. 2.878 95.760 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,159.10..1,345.39 rows=5 width=277) (actual time=15.626..95.760 rows=2,000 loops=1)

8. 3.086 88.882 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,158.67..1,342.97 rows=5 width=269) (actual time=15.610..88.882 rows=2,000 loops=1)

9. 2.624 81.796 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,158.24..1,307.25 rows=5 width=245) (actual time=15.596..81.796 rows=2,000 loops=1)

10. 2.471 77.172 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,158.11..1,306.49 rows=5 width=249) (actual time=15.582..77.172 rows=2,000 loops=1)

11. 2.339 42.701 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,157.67..1,265.69 rows=5 width=249) (actual time=14.644..42.701 rows=2,000 loops=1)

12. 2.399 36.362 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,157.40..1,262.48 rows=5 width=239) (actual time=14.633..36.362 rows=2,000 loops=1)

  • Join Filter: (od_c_cb.id = od_db.buyer_id)
13. 2.521 33.963 ↓ 400.0 2,000 1

Nested Loop Left Join (cost=1,157.12..1,254.11 rows=5 width=229) (actual time=14.614..33.963 rows=2,000 loops=1)

14. 3.121 31.442 ↓ 400.0 2,000 1

Nested Loop (cost=1,156.69..1,205.26 rows=5 width=199) (actual time=14.605..31.442 rows=2,000 loops=1)

15. 1.958 26.321 ↓ 400.0 2,000 1

Nested Loop (cost=1,156.55..1,204.48 rows=5 width=187) (actual time=14.590..26.321 rows=2,000 loops=1)

16. 1.737 16.195 ↓ 408.4 2,042 1

Hash Join (cost=1,156.27..1,202.05 rows=5 width=40) (actual time=13.759..16.195 rows=2,042 loops=1)

  • Hash Cond: (nb.surplus_id = fi_si.id)
17. 1.233 1.233 ↑ 1.0 2,042 1

Seq Scan on nettingbundle nb (cost=0.00..40.42 rows=2,042 width=16) (actual time=0.438..1.233 rows=2,042 loops=1)

18. 5.058 13.225 ↑ 1.0 14,760 1

Hash (cost=970.92..970.92 rows=14,828 width=32) (actual time=13.224..13.225 rows=14,760 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 936kB
19. 8.167 8.167 ↑ 1.0 14,760 1

Index Scan using supplierinvoice_lastauction_idx on supplierinvoice fi_si (cost=0.43..970.92 rows=14,828 width=32) (actual time=0.032..8.167 rows=14,760 loops=1)

  • Index Cond: (lastauction_id = 6656)
20. 8.168 8.168 ↑ 1.0 1 2,042

Index Scan using suppliercreditnote_nettingbundle_idx on suppliercreditnote scn (cost=0.28..0.48 rows=1 width=155) (actual time=0.003..0.004 rows=1 loops=2,042)

  • Index Cond: (nettingbundle_id = nb.id)
21. 2.000 2.000 ↑ 1.0 1 2,000

Index Scan using divisionbase_pkey on divisionbase od_db (cost=0.14..0.16 rows=1 width=28) (actual time=0.001..0.001 rows=1 loops=2,000)

  • Index Cond: (id = fi_si.originatordivision_id)
  • Filter: (buyer_id = 64608300)
22. 0.000 0.000 ↓ 0.0 0 2,000

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=2,000)

  • Index Cond: (id = scn.referencedinvoice_id)
23. 0.000 0.000 ↑ 1.0 1 2,000

Materialize (cost=0.28..8.30 rows=1 width=26) (actual time=0.000..0.000 rows=1 loops=2,000)

24. 0.011 0.011 ↑ 1.0 1 1

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

  • Index Cond: (id = 64608300)
25. 4.000 4.000 ↑ 1.0 1 2,000

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..0.64 rows=1 width=26) (actual time=0.002..0.002 rows=1 loops=2,000)

  • Index Cond: (id = scn.supplier_id)
26. 32.000 32.000 ↑ 1.0 1 2,000

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..8.16 rows=1 width=16) (actual time=0.016..0.016 rows=1 loops=2,000)

  • Index Cond: (scn.importbatch_id = id)
27. 2.000 2.000 ↑ 1.0 1 2,000

Index Scan using crxcurrency_pkey on crxcurrency c (cost=0.13..0.16 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=2,000)

  • Index Cond: (scn.currency_id = id)
28. 4.000 4.000 ↑ 1.0 1 2,000

Index Scan using earlypaymentsettlement_invoice_uq on earlypaymentsettlement fi_eps (cost=0.43..7.14 rows=1 width=40) (actual time=0.002..0.002 rows=1 loops=2,000)

  • Index Cond: (fi_si.id = invoice_id)
29. 4.000 4.000 ↑ 1.0 1 2,000

Index Scan using absearlypaymentsettlement_pkey on absearlypaymentsettlement fi_ps_abseps (cost=0.43..0.48 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=2,000)

  • Index Cond: (id = fi_eps.id)
30. 4.000 4.000 ↑ 1.0 1 2,000

Index Scan using absfinancingcontext_pkey on absfinancingcontext fi_ps_absfc_fc_afc (cost=0.28..0.30 rows=1 width=133) (actual time=0.002..0.002 rows=1 loops=2,000)

  • Index Cond: (id = fi_ps_abseps.financingcontext_id)
31. 2.000 2.000 ↑ 1.0 1 2,000

Index Only Scan using absdebtoragreement_pkey on absdebtoragreement fi_ps_abseps_t_absda (cost=0.14..0.15 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=2,000)

  • Index Cond: (id = fi_ps_abseps.absda_id)
  • Heap Fetches: 0
32. 0.000 0.000 ↓ 0.0 0 2,000

Index Scan using earlypaymentadvice_pkey on earlypaymentadvice fi_eps_epa (cost=0.14..0.16 rows=1 width=30) (actual time=0.000..0.000 rows=0 loops=2,000)

  • Index Cond: (id = fi_eps.earlypaymentadvice_id)
33. 4.000 4.000 ↑ 1.0 1 2,000

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt (cost=0.29..0.31 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=2,000)

  • Index Cond: (mapping_id = fi_eps.earlypaymentmapping_id)
34. 0.008 0.080 ↑ 1.0 6 1

Hash (cost=1.63..1.63 rows=6 width=140) (actual time=0.080..0.080 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
35. 0.009 0.072 ↑ 1.0 6 1

Merge Right Join (cost=1.42..1.63 rows=6 width=140) (actual time=0.066..0.072 rows=6 loops=1)

  • Merge Cond: (fi_cba.id = fi_ifca.maturitypaymentsaccount_id)
36. 0.012 0.012 ↑ 544.3 3 1

Index Scan using corporatebankaccount_pkey on corporatebankaccount fi_cba (cost=0.28..99.78 rows=1,633 width=132) (actual time=0.011..0.012 rows=3 loops=1)

37. 0.044 0.051 ↑ 1.0 6 1

Sort (cost=1.14..1.15 rows=6 width=24) (actual time=0.050..0.051 rows=6 loops=1)

  • Sort Key: fi_ifca.maturitypaymentsaccount_id
  • Sort Method: quicksort Memory: 25kB
38. 0.007 0.007 ↑ 1.0 6 1

Seq Scan on fiduciarycashaccount fi_ifca (cost=0.00..1.06 rows=6 width=24) (actual time=0.005..0.007 rows=6 loops=1)

39. 0.000 0.000 ↓ 0.0 0 2,000

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

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

SubPlan (for Nested Loop Left Join)

41. 2.000 6.000 ↑ 1.0 1 2,000

Aggregate (cost=8.31..8.32 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=2,000)

42. 4.000 4.000 ↑ 1.0 1 2,000

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt_1 (cost=0.29..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=2,000)

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 15.921 ms
Execution time : 130.748 ms