explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0heF

Settings
# exclusive inclusive rows x rows loops node
1. 9.036 284.052 ↑ 473.8 51 1

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

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.031 274.914 ↑ 592.3 17 3 / 3

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

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

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

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

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

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

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

6. 0.032 274.081 ↑ 592.3 17 3 / 3

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

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

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

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

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

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

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

10. 0.034 270.838 ↑ 592.3 17 3 / 3

Nested Loop (cost=2,697.88..17,699.39 rows=10,069 width=465) (actual time=268.698..270.838 rows=17 loops=3)

11. 0.046 270.753 ↑ 592.3 17 3 / 3

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

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

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

  • Hash Cond: (ps_apfeps.id = ps_eps.id)
13. 81.517 81.517 ↑ 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.517 rows=277,103 loops=3)

14. 31.116 96.821 ↑ 2,724.9 17 3 / 3

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

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

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

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

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

17. 9.606 9.606 ↑ 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.008..9.606 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.052 2.211 ↓ 6.0 30 3 / 3

Sort (cost=1,531.10..1,531.11 rows=5 width=68) (actual time=2.203..2.211 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.154 2.159 ↓ 10.2 51 3 / 3

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

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

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

22. 0.352 1.713 ↓ 10.2 51 3 / 3

Nested Loop (cost=0.86..1,525.61 rows=5 width=56) (actual time=0.082..1.713 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.187 1.189 ↓ 9.1 172 3 / 3

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

24. 0.255 0.658 ↓ 1.2 172 3 / 3

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

25. 0.059 0.059 ↑ 1.0 172 3 / 3

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

26. 0.344 0.344 ↑ 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.002..0.002 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.165 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.007 0.007 ↑ 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.004..0.007 rows=5 loops=3)

  • Filter: (bank_id = 3053)
  • Rows Removed by Filter: 15
30. 0.102 0.102 ↑ 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.002..0.002 rows=1 loops=153)

  • Index Cond: (id = fi_eps.invoice_id)
31. 0.090 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.012 0.012 ↑ 1.0 14 3 / 3

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

33. 0.012 0.085 ↑ 1.0 20 3 / 3

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

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

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

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
35. 0.018 0.018 ↑ 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.015..0.018 rows=6 loops=3)

36. 0.024 0.036 ↑ 1.0 20 3 / 3

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.030..0.036 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.012 0.012 ↑ 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.006..0.012 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.645 1.603 ↑ 1.0 1,650 3 / 3

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
41. 0.958 0.958 ↑ 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.011..0.958 rows=1,650 loops=3)

42. 0.656 1.455 ↑ 1.0 1,650 3 / 3

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
43. 0.799 0.799 ↑ 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.002..0.799 rows=1,650 loops=3)

44. 0.005 0.013 ↑ 1.0 6 3 / 3

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

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

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.005..0.008 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.336 0.658 ↑ 1.0 945 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
48. 0.322 0.322 ↑ 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.322 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.001..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.422 ms
Execution time : 284.391 ms