explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zb1U

Settings
# exclusive inclusive rows x rows loops node
1. 8.960 254.419 ↑ 245.3 67 1

Gather (cost=4,000.40..160,084.12 rows=16,434 width=1,810) (actual time=252.339..254.419 rows=67 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.040 245.325 ↑ 311.3 22 3 / 3

Hash Left Join (cost=3,000.40..23,133.85 rows=6,848 width=1,655) (actual time=244.746..245.325 rows=22 loops=3)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.034 245.281 ↑ 311.3 22 3 / 3

Hash Left Join (cost=2,990.17..23,097.94 rows=6,848 width=1,655) (actual time=244.727..245.281 rows=22 loops=3)

  • Hash Cond: (fi_si.paymentadvice_id = fi_ipa.id)
4. 0.035 245.242 ↑ 311.3 22 3 / 3

Hash Left Join (cost=2,979.95..23,069.74 rows=6,848 width=611) (actual time=244.708..245.242 rows=22 loops=3)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.030 244.460 ↑ 311.3 22 3 / 3

Nested Loop Left Join (cost=2,947.68..23,019.50 rows=6,848 width=597) (actual time=243.948..244.460 rows=22 loops=3)

6. 0.041 244.363 ↑ 311.3 22 3 / 3

Hash Left Join (cost=2,947.25..19,612.57 rows=6,848 width=597) (actual time=243.933..244.363 rows=22 loops=3)

  • Hash Cond: (si.currency_id = c.id)
7. 0.038 244.306 ↑ 311.3 22 3 / 3

Hash Left Join (cost=2,946.12..19,580.76 rows=6,848 width=601) (actual time=243.900..244.306 rows=22 loops=3)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.038 242.726 ↑ 311.3 22 3 / 3

Hash Left Join (cost=2,734.99..19,351.62 rows=6,848 width=591) (actual time=242.342..242.726 rows=22 loops=3)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.035 240.863 ↑ 311.3 22 3 / 3

Nested Loop Left Join (cost=2,523.87..19,122.47 rows=6,848 width=581) (actual time=240.501..240.863 rows=22 loops=3)

10. 0.038 240.761 ↑ 311.3 22 3 / 3

Nested Loop Left Join (cost=2,523.45..15,943.33 rows=6,848 width=465) (actual time=240.485..240.761 rows=22 loops=3)

11. 0.051 240.656 ↑ 311.3 22 3 / 3

Hash Left Join (cost=2,523.02..12,692.02 rows=6,848 width=457) (actual time=240.466..240.656 rows=22 loops=3)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
12. 91.189 240.506 ↑ 311.3 22 3 / 3

Parallel Hash Join (cost=2,519.84..12,594.67 rows=6,848 width=447) (actual time=240.337..240.506 rows=22 loops=3)

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

14. 0.226 71.114 ↑ 1,432.0 22 3 / 3

Parallel Hash (cost=2,126.05..2,126.05 rows=31,503 width=431) (actual time=71.113..71.114 rows=22 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 1056kB
15. 0.043 70.888 ↑ 1,432.0 22 3 / 3

Merge Join (cost=1,541.96..2,126.05 rows=31,503 width=431) (actual time=48.190..70.888 rows=22 loops=3)

  • Merge Cond: (si.nettingbundle_id = nb.id)
16. 7.039 68.233 ↑ 23,355.5 58 3 / 3

Nested Loop (cost=0.86..1,790,308.62 rows=1,354,620 width=371) (actual time=0.119..68.233 rows=58 loops=3)

17. 11.096 11.096 ↑ 65.6 25,049 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.013..11.096 rows=25,049 loops=3)

18. 50.098 50.098 ↓ 0.0 0 75,147 / 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=75,147)

  • Index Cond: (invoice_id = si.id)
  • Filter: (creationdate >= '2019-01-01'::date)
19. 0.061 2.612 ↓ 5.8 23 3 / 3

Sort (cost=1,541.10..1,541.11 rows=4 width=68) (actual time=2.605..2.612 rows=23 loops=3)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 34kB
  • Worker 0: Sort Method: quicksort Memory: 34kB
  • Worker 1: Sort Method: quicksort Memory: 34kB
20. 0.261 2.551 ↓ 16.8 67 3 / 3

Nested Loop Left Join (cost=1.29..1,541.06 rows=4 width=68) (actual time=1.243..2.551 rows=67 loops=3)

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 871
21. 0.112 2.022 ↓ 16.8 67 3 / 3

Nested Loop (cost=1.29..1,539.04 rows=4 width=56) (actual time=1.213..2.022 rows=67 loops=3)

22. 0.253 1.776 ↓ 16.8 67 3 / 3

Nested Loop (cost=0.86..1,536.59 rows=4 width=56) (actual time=1.199..1.776 rows=67 loops=3)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 525
23. 0.109 1.351 ↓ 7.8 172 3 / 3

Nested Loop (cost=0.86..1,534.05 rows=22 width=64) (actual time=0.026..1.351 rows=172 loops=3)

24. 0.156 0.726 ↑ 1.0 172 3 / 3

Nested Loop (cost=0.43..1,457.12 rows=172 width=56) (actual time=0.015..0.726 rows=172 loops=3)

25. 0.054 0.054 ↑ 1.0 172 3 / 3

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (actual time=0.009..0.054 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)
27. 0.516 0.516 ↑ 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.003..0.003 rows=1 loops=516)

  • Index Cond: (id = fi_eps.id)
28. 0.164 0.172 ↑ 1.3 3 516 / 3

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

29. 0.008 0.008 ↑ 1.0 4 3 / 3

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.25 rows=4 width=8) (actual time=0.006..0.008 rows=4 loops=3)

  • Filter: (buyer_id = 67002626)
  • Rows Removed by Filter: 16
30. 0.134 0.134 ↑ 1.0 1 201 / 3

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

  • Index Cond: (id = fi_eps.invoice_id)
31. 0.254 0.268 ↑ 1.0 14 201 / 3

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

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.007..0.014 rows=14 loops=3)

33. 0.013 0.099 ↑ 1.0 20 3 / 3

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

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

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

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

36. 0.029 0.044 ↑ 1.0 20 3 / 3

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.038..0.044 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.015 0.015 ↑ 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.015 rows=20 loops=3)

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

  • Index Cond: (id = ps_apfeps.financingcontext_id)
39. 0.067 0.067 ↑ 1.0 1 67 / 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=67)

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

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

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

42. 0.699 1.542 ↑ 1.0 1,650 3 / 3

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

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

44. 0.002 0.016 ↑ 1.0 6 3 / 3

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

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

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
48. 0.361 0.361 ↑ 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.361 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.134 0.134 ↑ 1.0 1 67

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

55. 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 : 10.615 ms
Execution time : 254.825 ms