explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pp0

Settings
# exclusive inclusive rows x rows loops node
1. 23.567 467.986 ↑ 1,880.8 67 1

Gather (cost=33,308.10..1,093,012.39 rows=126,011 width=1,810) (actual time=453.649..467.986 rows=67 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.021 444.352 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=32,308.10..49,586.39 rows=31,503 width=1,655) (actual time=420.084..444.352 rows=13 loops=5)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.021 444.329 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=32,297.87..49,458.02 rows=31,503 width=1,655) (actual time=420.074..444.329 rows=13 loops=5)

  • Hash Cond: (fi_si.paymentadvice_id = fi_ipa.id)
4. 0.020 444.306 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=32,287.65..49,365.10 rows=31,503 width=611) (actual time=420.064..444.306 rows=13 loops=5)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.027 443.992 ↑ 2,423.3 13 5 / 5

Nested Loop Left Join (cost=32,255.38..49,250.14 rows=31,503 width=597) (actual time=419.764..443.992 rows=13 loops=5)

6. 0.021 443.938 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=32,254.95..33,577.17 rows=31,503 width=597) (actual time=419.757..443.938 rows=13 loops=5)

  • Hash Cond: (si.currency_id = c.id)
7. 0.021 443.910 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=32,253.82..33,434.93 rows=31,503 width=601) (actual time=419.743..443.910 rows=13 loops=5)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.020 443.279 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=32,042.69..33,140.90 rows=31,503 width=591) (actual time=419.126..443.279 rows=13 loops=5)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.796 442.637 ↑ 2,423.3 13 5 / 5

Parallel Hash Left Join (cost=31,831.57..32,846.87 rows=31,503 width=581) (actual time=418.496..442.637 rows=13 loops=5)

  • Hash Cond: (fi_ps_apfeps.financingcontext_id = fi_ps_apffc_fc_afc.id)
10. 0.021 369.198 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=24,686.48..25,619.08 rows=31,503 width=465) (actual time=345.075..369.198 rows=13 loops=5)

  • Hash Cond: (ps_apfeps_t_apfda.bank_id = ps_eps_t_bc_cb.id)
11. 0.023 368.460 ↑ 2,423.3 13 5 / 5

Hash Left Join (cost=24,475.35..25,325.05 rows=31,503 width=455) (actual time=344.350..368.460 rows=13 loops=5)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
12. 0.895 368.428 ↑ 2,423.3 13 5 / 5

Parallel Hash Left Join (cost=24,473.90..25,223.39 rows=31,503 width=455) (actual time=344.333..368.428 rows=13 loops=5)

  • Hash Cond: (ps_apfeps.financingcontext_id = ps_apffc_fc_fcb.id)
13. 1.293 266.397 ↑ 2,423.3 13 5 / 5

Parallel Hash Left Join (cost=14,630.49..15,297.28 rows=31,503 width=447) (actual time=242.320..266.397 rows=13 loops=5)

  • Hash Cond: (ps_eps.id = ps_apfeps.id)
14. 0.037 68.369 ↑ 2,423.3 13 5 / 5

Merge Join (cost=1,541.96..2,126.05 rows=31,503 width=431) (actual time=44.310..68.369 rows=13 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
15. 10.130 65.457 ↑ 38,703.4 35 5 / 5

Nested Loop (cost=0.86..1,790,308.62 rows=1,354,620 width=371) (actual time=0.790..65.457 rows=35 loops=5)

16. 10.238 10.238 ↑ 109.3 15,030 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.660..10.238 rows=15,030 loops=5)

17. 45.089 45.089 ↓ 0.0 0 75,149 / 5

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement ps_eps (cost=0.43..0.61 rows=1 width=196) (actual time=0.003..0.003 rows=0 loops=75,149)

  • Index Cond: (invoice_id = si.id)
  • Filter: (creationdate >= '2019-01-01'::date)
18. 0.076 2.875 ↓ 6.2 25 5 / 5

Sort (cost=1,541.10..1,541.11 rows=4 width=68) (actual time=2.866..2.875 rows=25 loops=5)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 34kB
  • Worker 0: Sort Method: quicksort Memory: 34kB
  • Worker 1: Sort Method: quicksort Memory: 34kB
  • Worker 2: Sort Method: quicksort Memory: 34kB
  • Worker 3: Sort Method: quicksort Memory: 34kB
19. 0.340 2.799 ↓ 16.8 67 5 / 5

Nested Loop Left Join (cost=1.29..1,541.06 rows=4 width=68) (actual time=1.286..2.799 rows=67 loops=5)

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 871
20. 0.115 2.124 ↓ 16.8 67 5 / 5

Nested Loop (cost=1.29..1,539.04 rows=4 width=56) (actual time=1.248..2.124 rows=67 loops=5)

21. 0.365 1.875 ↓ 16.8 67 5 / 5

Nested Loop (cost=0.86..1,536.59 rows=4 width=56) (actual time=1.236..1.875 rows=67 loops=5)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 525
22. 0.262 1.338 ↓ 7.8 172 5 / 5

Nested Loop (cost=0.86..1,534.05 rows=22 width=64) (actual time=0.036..1.338 rows=172 loops=5)

23. 0.313 0.732 ↑ 1.0 172 5 / 5

Nested Loop (cost=0.43..1,457.12 rows=172 width=56) (actual time=0.021..0.732 rows=172 loops=5)

24. 0.075 0.075 ↑ 1.0 172 5 / 5

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

25. 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)
26. 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)
27. 0.163 0.172 ↑ 1.3 3 860 / 5

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

28. 0.009 0.009 ↑ 1.0 4 5 / 5

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

  • Filter: (buyer_id = 67002626)
  • Rows Removed by Filter: 16
29. 0.134 0.134 ↑ 1.0 1 335 / 5

Index Scan using supplierinvoice_pkey on supplierinvoice fi_si (cost=0.43..0.61 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=335)

  • Index Cond: (id = fi_eps.invoice_id)
30. 0.320 0.335 ↑ 1.0 14 335 / 5

Materialize (cost=0.00..1.21 rows=14 width=28) (actual time=0.000..0.005 rows=14 loops=335)

31. 0.015 0.015 ↑ 1.0 14 5 / 5

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

32. 115.173 196.735 ↑ 2.1 166,262 5 / 5

Parallel Hash (cost=8,758.79..8,758.79 rows=346,379 width=24) (actual time=196.734..196.735 rows=166,262 loops=5)

  • Buckets: 1048576 Batches: 1 Memory Usage: 53856kB
33. 81.562 81.562 ↑ 2.1 166,262 5 / 5

Parallel Seq Scan on apfearlypaymentsettlement ps_apfeps (cost=0.00..8,758.79 rows=346,379 width=24) (actual time=0.007..81.562 rows=166,262 loops=5)

34. 58.956 101.136 ↑ 2.1 78,899 5 / 5

Parallel Hash (cost=7,788.74..7,788.74 rows=164,374 width=24) (actual time=101.135..101.136 rows=78,899 loops=5)

  • Buckets: 524288 Batches: 1 Memory Usage: 26720kB
35. 42.180 42.180 ↑ 2.1 78,899 5 / 5

Parallel Seq Scan on financingcontextbase ps_apffc_fc_fcb (cost=0.00..7,788.74 rows=164,374 width=24) (actual time=0.006..42.180 rows=78,899 loops=5)

36. 0.005 0.009 ↑ 1.0 20 2 / 5

Hash (cost=1.20..1.20 rows=20 width=16) (actual time=0.022..0.022 rows=20 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
37. 0.004 0.004 ↑ 1.0 20 2 / 5

Seq Scan on apfdebtoragreement ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=16) (actual time=0.003..0.010 rows=20 loops=2)

38. 0.284 0.717 ↑ 1.0 1,650 2 / 5

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
39. 0.432 0.432 ↑ 1.0 1,650 2 / 5

Seq Scan on corporatebase ps_eps_t_bc_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.010..1.081 rows=1,650 loops=2)

40. 41.628 72.643 ↑ 2.1 47,959 5 / 5

Parallel Hash (cost=5,896.15..5,896.15 rows=99,915 width=132) (actual time=72.643..72.643 rows=47,959 loops=5)

  • Buckets: 262144 Batches: 1 Memory Usage: 20896kB
41. 31.015 31.015 ↑ 2.1 47,959 5 / 5

Parallel Seq Scan on apffinancingcontext fi_ps_apffc_fc_afc (cost=0.00..5,896.15 rows=99,915 width=132) (actual time=0.004..31.015 rows=47,959 loops=5)

42. 0.281 0.622 ↑ 1.0 1,650 2 / 5

Hash (cost=190.50..190.50 rows=1,650 width=26) (actual time=1.555..1.556 rows=1,650 loops=2)

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
43. 0.341 0.341 ↑ 1.0 1,650 2 / 5

Seq Scan on corporatebase od_c_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.003..0.853 rows=1,650 loops=2)

44. 0.275 0.610 ↑ 1.0 1,650 2 / 5

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
45. 0.335 0.335 ↑ 1.0 1,650 2 / 5

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

46. 0.003 0.007 ↑ 1.0 6 2 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
47. 0.004 0.004 ↑ 1.0 6 2 / 5

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.008..0.011 rows=6 loops=2)

48. 0.027 0.027 ↑ 1.0 1 67 / 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=67)

  • Index Cond: (si.importbatch_id = id)
49. 0.154 0.294 ↑ 1.0 945 2 / 5

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=0.734..0.735 rows=945 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
50. 0.140 0.140 ↑ 1.0 945 2 / 5

Seq Scan on earlypaymentadvice fi_eps_epa (cost=0.00..20.45 rows=945 width=30) (actual time=0.006..0.350 rows=945 loops=2)

51. 0.000 0.002 ↓ 0.0 0 2 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
52. 0.002 0.002 ↓ 0.0 0 2 / 5

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

53. 0.000 0.002 ↓ 0.0 0 2 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
54. 0.002 0.002 ↓ 0.0 0 2 / 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=2)

55.          

SubPlan (for Gather)

56. 0.067 0.067 ↑ 1.0 1 67

Aggregate (cost=8.15..8.16 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=67)

57. 0.000 0.000 ↓ 0.0 0 67

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

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 9.924 ms
Execution time : 468.340 ms