explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MESy

Settings
# exclusive inclusive rows x rows loops node
1. 10.953 304.785 ↑ 473.8 51 1

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

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

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

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

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

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

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

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

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

6. 0.032 292.898 ↑ 592.3 17 3 / 3

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

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

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

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

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

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

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

10. 0.035 289.490 ↑ 592.3 17 3 / 3

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

11. 0.047 289.387 ↑ 592.3 17 3 / 3

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

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

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

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

14. 31.945 95.322 ↑ 2,724.9 17 3 / 3

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

  • Buckets: 262144 Batches: 1 Memory Usage: 2080kB
15. 0.034 63.377 ↑ 2,724.9 17 3 / 3

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

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

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

17. 10.521 10.521 ↑ 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.014..10.521 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.016 0.716 ↓ 10.2 51 1 / 3

Sort (cost=1,531.10..1,531.11 rows=5 width=68) (actual time=2.136..2.149 rows=51 loops=1)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 32kB
20. 0.036 0.700 ↓ 10.2 51 1 / 3

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

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

Nested Loop (cost=1.29..1,528.81 rows=5 width=56) (actual time=0.100..1.891 rows=51 loops=1)

22. 0.088 0.556 ↓ 10.2 51 1 / 3

Nested Loop (cost=0.86..1,525.61 rows=5 width=56) (actual time=0.091..1.669 rows=51 loops=1)

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

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

24. 0.037 0.227 ↓ 1.2 172 1 / 3

Nested Loop (cost=0.43..1,457.55 rows=146 width=56) (actual time=0.014..0.680 rows=172 loops=1)

25. 0.017 0.017 ↑ 1.0 172 1 / 3

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (actual time=0.006..0.052 rows=172 loops=1)

26. 0.172 0.172 ↑ 1.0 1 172 / 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=172)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
27. 0.115 0.115 ↑ 1.0 1 172 / 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=172)

  • Index Cond: (id = fi_eps.id)
28. 0.055 0.057 ↑ 1.2 4 172 / 3

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

29. 0.002 0.002 ↑ 1.0 5 1 / 3

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.25 rows=5 width=8) (actual time=0.003..0.007 rows=5 loops=1)

  • Filter: (bank_id = 3053)
  • Rows Removed by Filter: 15
30. 0.051 0.051 ↑ 1.0 1 51 / 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=51)

  • Index Cond: (id = fi_eps.invoice_id)
31. 0.030 0.034 ↑ 2.0 7 51 / 3

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

32. 0.004 0.004 ↑ 1.0 14 1 / 3

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

33. 0.012 0.128 ↑ 1.0 20 3 / 3

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

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

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

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

36. 0.045 0.071 ↑ 1.0 20 3 / 3

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.066..0.071 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.026 0.026 ↑ 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.020..0.026 rows=20 loops=3)

38. 0.068 0.068 ↑ 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.004..0.004 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.679 1.692 ↑ 1.0 1,650 3 / 3

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

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

42. 0.677 1.502 ↑ 1.0 1,650 3 / 3

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

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

44. 0.006 0.017 ↑ 1.0 6 3 / 3

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

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

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.009..0.011 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.353 0.693 ↑ 1.0 945 3 / 3

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

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

Seq Scan on earlypaymentadvice fi_eps_epa (cost=0.00..20.45 rows=945 width=30) (actual time=0.006..0.340 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.051 0.051 ↑ 1.0 1 51

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