explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PfJJ

Settings
# exclusive inclusive rows x rows loops node
1. 9.555 299.540 ↑ 473.8 51 1

Gather (cost=4,174.83..228,961.31 rows=24,166 width=1,810) (actual time=293.969..299.540 rows=51 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.032 289.883 ↑ 592.3 17 3 / 3

Hash Left Join (cost=3,174.83..28,048.08 rows=10,069 width=1,655) (actual time=286.426..289.883 rows=17 loops=3)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.030 289.847 ↑ 592.3 17 3 / 3

Hash Left Join (cost=3,164.61..28,000.09 rows=10,069 width=1,655) (actual time=286.407..289.847 rows=17 loops=3)

  • Hash Cond: (fi_si.paymentadvice_id = fi_ipa.id)
4. 0.034 289.812 ↑ 592.3 17 3 / 3

Hash Left Join (cost=3,154.38..27,963.43 rows=10,069 width=611) (actual time=286.388..289.812 rows=17 loops=3)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.034 289.056 ↑ 592.3 17 3 / 3

Nested Loop Left Join (cost=3,122.12..27,904.74 rows=10,069 width=597) (actual time=285.649..289.056 rows=17 loops=3)

6. 0.032 288.971 ↑ 592.3 17 3 / 3

Hash Left Join (cost=3,121.69..22,895.33 rows=10,069 width=597) (actual time=285.633..288.971 rows=17 loops=3)

  • Hash Cond: (si.currency_id = c.id)
7. 0.034 288.924 ↑ 592.3 17 3 / 3

Hash Left Join (cost=3,120.55..22,849.10 rows=10,069 width=601) (actual time=285.603..288.924 rows=17 loops=3)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.034 287.382 ↑ 592.3 17 3 / 3

Hash Left Join (cost=2,909.43..22,611.48 rows=10,069 width=591) (actual time=284.079..287.382 rows=17 loops=3)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.036 285.638 ↑ 592.3 17 3 / 3

Nested Loop Left Join (cost=2,698.30..22,373.85 rows=10,069 width=581) (actual time=282.353..285.638 rows=17 loops=3)

10. 0.047 285.551 ↑ 592.3 17 3 / 3

Nested Loop Left Join (cost=2,697.88..17,699.39 rows=10,069 width=465) (actual time=282.337..285.551 rows=17 loops=3)

11. 0.484 285.453 ↑ 592.3 17 3 / 3

Hash Left Join (cost=2,697.46..12,918.79 rows=10,069 width=457) (actual time=282.319..285.453 rows=17 loops=3)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
12. 105.597 284.874 ↑ 592.3 17 3 / 3

Parallel Hash Join (cost=2,694.28..12,777.16 rows=10,069 width=447) (actual time=282.195..284.874 rows=17 loops=3)

  • Hash Cond: (ps_apfeps.id = ps_eps.id)
13. 81.972 81.972 ↑ 1.3 277,103 3 / 3

Parallel Seq Scan on apfearlypaymentsettlement ps_apfeps (cost=0.00..8,758.79 rows=346,379 width=24) (actual time=0.005..81.972 rows=277,103 loops=3)

14. 31.219 97.305 ↑ 2,724.9 17 3 / 3

Parallel Hash (cost=2,115.24..2,115.24 rows=46,323 width=431) (actual time=97.305..97.305 rows=17 loops=3)

  • Buckets: 262144 Batches: 1 Memory Usage: 2144kB
15. 0.047 66.086 ↑ 2,724.9 17 3 / 3

Merge Join (cost=1,531.96..2,115.24 rows=46,323 width=431) (actual time=2.799..66.086 rows=17 loops=3)

  • Merge Cond: (si.nettingbundle_id = nb.id)
16. 3.360 63.711 ↑ 27,474.5 58 3 / 3

Nested Loop (cost=0.86..1,786,202.47 rows=1,593,520 width=371) (actual time=0.130..63.711 rows=58 loops=3)

17. 10.453 10.453 ↑ 65.8 24,949 3 / 3

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.017..10.453 rows=24,949 loops=3)

18. 49.898 49.898 ↓ 0.0 0 74,847 / 3

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement ps_eps (cost=0.43..0.61 rows=1 width=196) (actual time=0.002..0.002 rows=0 loops=74,847)

  • Index Cond: (invoice_id = si.id)
19. 0.055 2.328 ↓ 6.0 30 3 / 3

Sort (cost=1,531.10..1,531.11 rows=5 width=68) (actual time=2.319..2.328 rows=30 loops=3)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 32kB
  • Worker 0: Sort Method: quicksort Memory: 32kB
  • Worker 1: Sort Method: quicksort Memory: 32kB
20. 0.143 2.273 ↓ 10.2 51 3 / 3

Nested Loop Left Join (cost=1.29..1,531.04 rows=5 width=68) (actual time=0.116..2.273 rows=51 loops=3)

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 322
21. 0.073 2.028 ↓ 10.2 51 3 / 3

Nested Loop (cost=1.29..1,528.81 rows=5 width=56) (actual time=0.104..2.028 rows=51 loops=3)

22. 0.337 1.802 ↓ 10.2 51 3 / 3

Nested Loop (cost=0.86..1,525.61 rows=5 width=56) (actual time=0.090..1.802 rows=51 loops=3)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 691
23. 0.252 1.293 ↓ 9.1 172 3 / 3

Nested Loop (cost=0.86..1,522.97 rows=19 width=64) (actual time=0.026..1.293 rows=172 loops=3)

24. 0.126 0.697 ↓ 1.2 172 3 / 3

Nested Loop (cost=0.43..1,457.55 rows=146 width=56) (actual time=0.015..0.697 rows=172 loops=3)

25. 0.055 0.055 ↑ 1.0 172 3 / 3

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

26. 0.516 0.516 ↑ 1.0 1 516 / 3

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

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

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

  • Index Cond: (id = fi_eps.id)
28. 0.163 0.172 ↑ 1.2 4 516 / 3

Materialize (cost=0.00..1.27 rows=5 width=8) (actual time=0.000..0.001 rows=4 loops=516)

29. 0.009 0.009 ↑ 1.0 5 3 / 3

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.25 rows=5 width=8) (actual time=0.005..0.009 rows=5 loops=3)

  • Filter: (bank_id = 3053)
  • Rows Removed by Filter: 15
30. 0.153 0.153 ↑ 1.0 1 153 / 3

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

  • Index Cond: (id = fi_eps.invoice_id)
31. 0.088 0.102 ↑ 2.0 7 153 / 3

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

32. 0.014 0.014 ↑ 1.0 14 3 / 3

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

33. 0.012 0.095 ↑ 1.0 20 3 / 3

Hash (cost=2.93..2.93 rows=20 width=26) (actual time=0.094..0.095 rows=20 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
34. 0.021 0.083 ↑ 1.0 20 3 / 3

Merge Right Join (cost=2.05..2.93 rows=20 width=26) (actual time=0.061..0.083 rows=20 loops=3)

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
35. 0.020 0.020 ↑ 275.0 6 3 / 3

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.016..0.020 rows=6 loops=3)

36. 0.028 0.042 ↑ 1.0 20 3 / 3

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.036..0.042 rows=20 loops=3)

  • Sort Key: ps_apfeps_t_apfda.bank_id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
37. 0.014 0.014 ↑ 1.0 20 3 / 3

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

38. 0.051 0.051 ↑ 1.0 1 51 / 3

Index Scan using financingcontextbase_pkey on financingcontextbase ps_apffc_fc_fcb (cost=0.42..0.47 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=51)

  • Index Cond: (id = ps_apfeps.financingcontext_id)
39. 0.051 0.051 ↑ 1.0 1 51 / 3

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

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
40. 0.676 1.710 ↑ 1.0 1,650 3 / 3

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
41. 1.034 1.034 ↑ 1.0 1,650 3 / 3

Seq Scan on corporatebase od_c_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.013..1.034 rows=1,650 loops=3)

42. 0.673 1.508 ↑ 1.0 1,650 3 / 3

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
43. 0.835 0.835 ↑ 1.0 1,650 3 / 3

Seq Scan on corporatebase s_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.003..0.835 rows=1,650 loops=3)

44. 0.006 0.015 ↑ 1.0 6 3 / 3

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

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

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

46. 0.051 0.051 ↑ 1.0 1 51 / 3

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

  • Index Cond: (si.importbatch_id = id)
47. 0.375 0.722 ↑ 1.0 945 3 / 3

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=0.721..0.722 rows=945 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
48. 0.347 0.347 ↑ 1.0 945 3 / 3

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

49. 0.001 0.005 ↓ 0.0 0 3 / 3

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

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

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

51. 0.001 0.004 ↓ 0.0 0 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
52. 0.003 0.003 ↓ 0.0 0 3 / 3

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

53.          

SubPlan (for Gather)

54. 0.102 0.102 ↑ 1.0 1 51

Aggregate (cost=8.15..8.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=51)

55. 0.000 0.000 ↓ 0.0 0 51

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

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 10.628 ms
Execution time : 299.949 ms