explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BIDJ

Settings
# exclusive inclusive rows x rows loops node
1. 8.765 28.847 ↑ 295.4 2,457 1

Gather (cost=3,022.78..6,100,136.89 rows=725,738 width=1,831) (actual time=10.290..28.847 rows=2,457 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.417 15.168 ↑ 369.5 491 5 / 5

Hash Left Join (cost=2,022.78..95,469.29 rows=181,434 width=381) (actual time=8.740..15.168 rows=491 loops=5)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.431 14.747 ↑ 369.5 491 5 / 5

Hash Left Join (cost=2,012.55..94,778.68 rows=181,434 width=381) (actual time=8.722..14.747 rows=491 loops=5)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
4. 0.640 13.575 ↑ 369.5 491 5 / 5

Nested Loop Left Join (cost=1,980.29..94,270.15 rows=181,434 width=367) (actual time=7.970..13.575 rows=491 loops=5)

5. 0.407 11.952 ↑ 369.5 491 5 / 5

Hash Left Join (cost=1,979.86..4,005.39 rows=181,434 width=367) (actual time=7.955..11.952 rows=491 loops=5)

  • Hash Cond: (si.currency_id = c.id)
6. 1.971 11.530 ↑ 369.5 491 5 / 5

Hash Left Join (cost=1,978.72..3,191.58 rows=181,434 width=371) (actual time=7.927..11.530 rows=491 loops=5)

  • Hash Cond: (si.supplier_id = s_cb.id)
7. 0.455 8.011 ↑ 369.5 491 5 / 5

Hash Left Join (cost=1,767.60..2,502.97 rows=181,434 width=361) (actual time=6.364..8.011 rows=491 loops=5)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
8. 0.789 5.882 ↑ 369.5 491 5 / 5

Merge Join (cost=1,556.47..1,814.36 rows=181,434 width=351) (actual time=4.629..5.882 rows=491 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
  • Join Filter: (si.id <> nb.surplus_id)
  • Rows Removed by Join Filter: 34
9. 0.314 0.314 ↑ 3,116.6 527 5 / 5

Parallel Index Scan using supplierinvoice_nettingbundle_idx on supplierinvoice si (cost=0.43..784,438.39 rows=1,642,460 width=191) (actual time=0.009..0.314 rows=527 loops=5)

10. 0.306 4.779 ↓ 30.9 588 5 / 5

Sort (cost=1,556.04..1,556.09 rows=19 width=184) (actual time=4.602..4.779 rows=588 loops=5)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 49kB
  • Worker 0: Sort Method: quicksort Memory: 49kB
  • Worker 1: Sort Method: quicksort Memory: 49kB
  • Worker 2: Sort Method: quicksort Memory: 49kB
  • Worker 3: Sort Method: quicksort Memory: 49kB
11. 0.201 4.473 ↓ 9.1 172 5 / 5

Nested Loop Left Join (cost=1.71..1,555.63 rows=19 width=184) (actual time=0.075..4.473 rows=172 loops=5)

12. 0.622 3.928 ↓ 9.1 172 5 / 5

Nested Loop Left Join (cost=1.29..1,546.81 rows=19 width=68) (actual time=0.061..3.928 rows=172 loops=5)

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 1286
13. 0.631 2.962 ↓ 9.1 172 5 / 5

Nested Loop (cost=1.29..1,541.83 rows=19 width=56) (actual time=0.051..2.962 rows=172 loops=5)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 1660
14. 0.254 1.815 ↓ 9.1 172 5 / 5

Nested Loop (cost=1.29..1,535.15 rows=19 width=64) (actual time=0.036..1.815 rows=172 loops=5)

15. 0.206 1.217 ↓ 9.1 172 5 / 5

Nested Loop (cost=0.86..1,522.97 rows=19 width=64) (actual time=0.027..1.217 rows=172 loops=5)

16. 0.262 0.667 ↓ 1.2 172 5 / 5

Nested Loop (cost=0.43..1,457.55 rows=146 width=56) (actual time=0.018..0.667 rows=172 loops=5)

17. 0.061 0.061 ↑ 1.0 172 5 / 5

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (actual time=0.008..0.061 rows=172 loops=5)

18. 0.344 0.344 ↑ 1.0 1 860 / 5

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

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
19. 0.344 0.344 ↑ 1.0 1 860 / 5

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=860)

  • Index Cond: (id = fi_eps.id)
20. 0.344 0.344 ↑ 1.0 1 860 / 5

Index Scan using supplierinvoice_pkey on supplierinvoice fi_si (cost=0.43..0.64 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=860)

  • Index Cond: (id = fi_eps.invoice_id)
21. 0.504 0.516 ↑ 1.8 11 860 / 5

Materialize (cost=0.00..1.30 rows=20 width=8) (actual time=0.000..0.003 rows=11 loops=860)

22. 0.012 0.012 ↑ 1.0 20 5 / 5

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=8) (actual time=0.005..0.012 rows=20 loops=5)

23. 0.333 0.344 ↑ 1.8 8 860 / 5

Materialize (cost=0.00..1.21 rows=14 width=28) (actual time=0.000..0.002 rows=8 loops=860)

24. 0.011 0.011 ↑ 1.0 14 5 / 5

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=28) (actual time=0.004..0.011 rows=14 loops=5)

25. 0.344 0.344 ↑ 1.0 1 860 / 5

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=860)

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
26. 0.702 1.674 ↑ 1.0 1,650 5 / 5

Hash (cost=190.50..190.50 rows=1,650 width=26) (actual time=1.674..1.674 rows=1,650 loops=5)

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
27. 0.972 0.972 ↑ 1.0 1,650 5 / 5

Seq Scan on corporatebase od_c_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.007..0.972 rows=1,650 loops=5)

28. 0.693 1.548 ↑ 1.0 1,650 5 / 5

Hash (cost=190.50..190.50 rows=1,650 width=26) (actual time=1.547..1.548 rows=1,650 loops=5)

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
29. 0.855 0.855 ↑ 1.0 1,650 5 / 5

Seq Scan on corporatebase s_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.002..0.855 rows=1,650 loops=5)

30. 0.006 0.015 ↑ 1.0 6 5 / 5

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.014..0.015 rows=6 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.009 0.009 ↑ 1.0 6 5 / 5

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.007..0.009 rows=6 loops=5)

32. 0.983 0.983 ↑ 1.0 1 2,457 / 5

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

  • Index Cond: (si.importbatch_id = id)
33. 0.389 0.741 ↑ 1.0 945 5 / 5

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=0.740..0.741 rows=945 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
34. 0.352 0.352 ↑ 1.0 945 5 / 5

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

35. 0.000 0.004 ↓ 0.0 0 5 / 5

Hash (cost=10.10..10.10 rows=10 width=16) (actual time=0.004..0.004 rows=0 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
36. 0.004 0.004 ↓ 0.0 0 5 / 5

Seq Scan on bankpaymenttransaction fi_bpt (cost=0.00..10.10 rows=10 width=16) (actual time=0.003..0.004 rows=0 loops=5)

37.          

SubPlan (for Gather)

38. 4.914 4.914 ↑ 1.0 1 2,457

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

39. 0.000 0.000 ↓ 0.0 0 2,457

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt (cost=0.14..8.15 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=2,457)

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 6.259 ms
Execution time : 29.798 ms