explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XVGK

Settings
# exclusive inclusive rows x rows loops node
1. 1.874 401.880 ↓ 2.9 1,271 1

Hash Left Join (cost=1,456.05..5,459.16 rows=435 width=1,826) (actual time=388.658..401.880 rows=1,271 loops=1)

  • Hash Cond: (ps_eps.earlypaymentmapping_id = bpt.mapping_id)
2. 0.847 398.733 ↓ 2.9 1,271 1

Hash Left Join (cost=1,445.82..1,892.26 rows=435 width=1,639) (actual time=388.631..398.733 rows=1,271 loops=1)

  • Hash Cond: (si.paymentadvice_id = ipa.id)
3. 0.958 397.884 ↓ 2.9 1,271 1

Hash Left Join (cost=1,435.60..1,880.89 rows=435 width=595) (actual time=388.620..397.884 rows=1,271 loops=1)

  • Hash Cond: (si.currency_id = c.id)
4. 0.897 396.916 ↓ 2.9 1,271 1

Nested Loop Left Join (cost=1,434.46..1,877.81 rows=435 width=599) (actual time=388.595..396.916 rows=1,271 loops=1)

5. 1.746 393.477 ↓ 2.9 1,271 1

Nested Loop Left Join (cost=1,434.03..1,661.39 rows=435 width=599) (actual time=388.582..393.477 rows=1,271 loops=1)

6. 1.142 390.460 ↓ 2.9 1,271 1

Hash Right Join (cost=1,433.75..1,533.02 rows=435 width=589) (actual time=388.573..390.460 rows=1,271 loops=1)

  • Hash Cond: (od_db.id = si.originatordivision_id)
7. 0.025 0.775 ↑ 1.0 14 1

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

8. 0.008 0.008 ↑ 1.0 14 1

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

9. 0.742 0.742 ↑ 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.053..0.053 rows=1 loops=14)

  • Index Cond: (id = od_db.buyer_id)
10. 1.017 388.543 ↓ 2.9 1,271 1

Hash (cost=1,428.04..1,428.04 rows=435 width=567) (actual time=388.543..388.543 rows=1,271 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 600kB
11. 1.159 387.526 ↓ 2.9 1,271 1

Hash Right Join (cost=1,401.67..1,428.04 rows=435 width=567) (actual time=386.371..387.526 rows=1,271 loops=1)

  • Hash Cond: (eps_epa.id = ps_eps.earlypaymentadvice_id)
12. 0.207 0.207 ↑ 1.0 945 1

Seq Scan on earlypaymentadvice eps_epa (cost=0.00..20.45 rows=945 width=30) (actual time=0.008..0.207 rows=945 loops=1)

13. 1.046 386.160 ↓ 2.9 1,271 1

Hash (cost=1,396.24..1,396.24 rows=435 width=553) (actual time=386.160..386.160 rows=1,271 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 596kB
14. 1.221 385.114 ↓ 2.9 1,271 1

Merge Right Join (cost=1,389.13..1,396.24 rows=435 width=553) (actual time=383.641..385.114 rows=1,271 loops=1)

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
15. 0.014 0.014 ↑ 275.0 6 1

Index Scan using corporatebase_pkey on corporatebase ps_eps_t_bc_cb (cost=0.28..234.48 rows=1,650 width=26) (actual time=0.011..0.014 rows=6 loops=1)

16. 1.773 383.879 ↓ 2.9 1,271 1

Sort (cost=1,388.71..1,389.80 rows=435 width=543) (actual time=383.614..383.879 rows=1,271 loops=1)

  • Sort Key: ps_apfeps_t_apfda.bank_id
  • Sort Method: quicksort Memory: 704kB
17. 0.920 382.106 ↓ 2.9 1,271 1

Hash Left Join (cost=4.13..1,369.65 rows=435 width=543) (actual time=3.228..382.106 rows=1,271 loops=1)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
18. 1.440 381.163 ↓ 2.9 1,271 1

Nested Loop (cost=2.69..1,366.81 rows=435 width=543) (actual time=3.197..381.163 rows=1,271 loops=1)

19. 13.174 377.179 ↓ 2.9 1,272 1

Nested Loop (cost=2.25..1,087.94 rows=435 width=352) (actual time=3.185..377.179 rows=1,272 loops=1)

20. 7.507 337.537 ↓ 25.8 13,234 1

Nested Loop (cost=1.82..209.18 rows=512 width=140) (actual time=3.173..337.537 rows=13,234 loops=1)

21. 2.171 22.327 ↓ 17.2 2,543 1

Nested Loop (cost=1.40..110.49 rows=148 width=140) (actual time=3.164..22.327 rows=2,543 loops=1)

22. 1.795 12.527 ↓ 17.2 2,543 1

Nested Loop (cost=0.97..42.70 rows=148 width=132) (actual time=3.156..12.527 rows=2,543 loops=1)

23. 0.009 3.176 ↓ 4.0 4 1

Nested Loop (cost=0.55..17.65 rows=1 width=8) (actual time=3.137..3.176 rows=4 loops=1)

24. 1.586 1.586 ↑ 1.0 1 1

Index Scan using paa_supplier_idx on payablesapprovalagreement paa (cost=0.28..8.29 rows=1 width=8) (actual time=1.584..1.586 rows=1 loops=1)

  • Index Cond: (supplier_id = 6167)
25. 1.581 1.581 ↑ 1.0 4 1

Index Scan using apfta_paa_idx on apftransferagreement apfta (cost=0.28..9.32 rows=4 width=16) (actual time=1.548..1.581 rows=4 loops=1)

  • Index Cond: (paa_id = paa.id)
26. 7.556 7.556 ↓ 2.6 636 4

Index Scan using apffinancingcontext_apfta_idx on apffinancingcontext ps_apffc_fc_afc (cost=0.42..22.62 rows=242 width=140) (actual time=0.385..1.889 rows=636 loops=4)

  • Index Cond: (apfta_id = apfta.id)
27. 7.629 7.629 ↑ 1.0 1 2,543

Index Only Scan using financingcontextbase_pkey on financingcontextbase ps_apffc_fc_fcb (cost=0.42..0.46 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=2,543)

  • Index Cond: (id = ps_apffc_fc_afc.id)
  • Heap Fetches: 0
28. 307.703 307.703 ↑ 1.2 5 2,543

Index Scan using apfearlypaymentsettlement_financingcontext_idx on apfearlypaymentsettlement ps_apfeps (cost=0.42..0.61 rows=6 width=24) (actual time=0.116..0.121 rows=5 loops=2,543)

  • Index Cond: (financingcontext_id = ps_apffc_fc_fcb.id)
29. 26.468 26.468 ↓ 0.0 0 13,234

Index Scan using earlypaymentsettlement_pkey on earlypaymentsettlement ps_eps (cost=0.43..1.72 rows=1 width=220) (actual time=0.002..0.002 rows=0 loops=13,234)

  • Index Cond: (id = ps_apfeps.id)
  • Filter: (creationdate >= '2019-01-01'::date)
  • Rows Removed by Filter: 1
30. 2.544 2.544 ↑ 1.0 1 1,272

Index Scan using supplierinvoice_pkey on supplierinvoice si (cost=0.43..0.64 rows=1 width=207) (actual time=0.002..0.002 rows=1 loops=1,272)

  • Index Cond: (id = ps_eps.invoice_id)
  • Filter: (nettingbundle_id IS NULL)
  • Rows Removed by Filter: 0
31. 0.009 0.023 ↑ 1.0 20 1

Hash (cost=1.20..1.20 rows=20 width=16) (actual time=0.023..0.023 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.014 0.014 ↑ 1.0 20 1

Seq Scan on apfdebtoragreement ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=16) (actual time=0.007..0.014 rows=20 loops=1)

33. 1.271 1.271 ↑ 1.0 1 1,271

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

  • Index Cond: (id = si.supplier_id)
34. 2.542 2.542 ↑ 1.0 1 1,271

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..0.50 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=1,271)

  • Index Cond: (si.importbatch_id = id)
35. 0.004 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
36. 0.006 0.006 ↑ 1.0 6 1

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

37. 0.000 0.002 ↓ 0.0 0 1

Hash (cost=10.10..10.10 rows=10 width=1,052) (actual time=0.002..0.002 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
38. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on invoicepaymentadvice ipa (cost=0.00..10.10 rows=10 width=1,052) (actual time=0.002..0.002 rows=0 loops=1)

39. 0.000 0.002 ↓ 0.0 0 1

Hash (cost=10.10..10.10 rows=10 width=16) (actual time=0.002..0.002 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
40. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on bankpaymenttransaction bpt (cost=0.00..10.10 rows=10 width=16) (actual time=0.002..0.002 rows=0 loops=1)

41.          

SubPlan (for Hash Left Join)

42. 1.271 1.271 ↑ 1.0 1 1,271

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

43. 0.000 0.000 ↓ 0.0 0 1,271

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=1,271)

  • Index Cond: (mapping_id = ps_eps.maturitypaymentmapping_id)
Planning time : 18.132 ms
Execution time : 402.483 ms