explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BSP5

Settings
# exclusive inclusive rows x rows loops node
1. 9.227 182.359 ↑ 295.4 2,457 1

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

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.390 170.675 ↑ 369.5 491 5 / 5

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

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

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

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

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

5. 0.390 160.975 ↑ 369.5 491 5 / 5

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

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

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

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

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

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

Merge Join (cost=1,556.47..1,814.36 rows=181,434 width=351) (actual time=136.306..140.315 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. 3.957 3.957 ↑ 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.823..3.957 rows=527 loops=5)

10. 0.412 135.631 ↓ 30.9 587 5 / 5

Sort (cost=1,556.04..1,556.09 rows=19 width=184) (actual time=135.462..135.631 rows=587 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.217 135.219 ↓ 9.1 172 5 / 5

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

12. 0.639 131.906 ↓ 9.1 172 5 / 5

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

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

Nested Loop (cost=1.29..1,541.83 rows=19 width=56) (actual time=5.544..130.407 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.276 128.751 ↓ 9.1 172 5 / 5

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

15. 0.280 68.791 ↓ 9.1 172 5 / 5

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

16. 0.269 59.911 ↓ 1.2 172 5 / 5

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

17. 0.646 0.646 ↑ 1.0 172 5 / 5

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

18. 58.996 58.996 ↑ 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.343..0.343 rows=1 loops=860)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
19. 8.600 8.600 ↑ 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.050..0.050 rows=1 loops=860)

  • Index Cond: (id = fi_eps.id)
20. 59.684 59.684 ↑ 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.347..0.347 rows=1 loops=860)

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

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

22. 0.495 0.495 ↑ 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.485..0.495 rows=20 loops=5)

23. 0.313 0.860 ↑ 1.8 8 860 / 5

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

24. 0.547 0.547 ↑ 1.0 14 5 / 5

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

25. 3.096 3.096 ↑ 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.018..0.018 rows=1 loops=860)

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

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
27. 16.541 16.541 ↑ 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.374..16.541 rows=1,650 loops=5)

28. 0.731 1.576 ↑ 1.0 1,650 5 / 5

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
29. 0.845 0.845 ↑ 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.004..0.845 rows=1,650 loops=5)

30. 0.007 0.502 ↑ 1.0 6 5 / 5

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

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

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

32. 6.388 6.388 ↑ 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.013..0.013 rows=1 loops=2,457)

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

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=1.725..1.726 rows=945 loops=5)

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

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

35. 0.001 0.008 ↓ 0.0 0 5 / 5

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

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

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

37.          

SubPlan (for Gather)

38. 2.457 2.457 ↑ 1.0 1 2,457

Aggregate (cost=8.15..8.16 rows=1 width=8) (actual time=0.001..0.001 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 : 108.661 ms
Execution time : 183.437 ms