explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ny5q

Settings
# exclusive inclusive rows x rows loops node
1. 25.160 41.356 ↑ 39.7 962 1

Gather (cost=3,016.31..329,570.69 rows=38,197 width=1,810) (actual time=11.087..41.356 rows=962 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.178 15.234 ↑ 49.7 192 5 / 5

Hash Left Join (cost=2,016.31..12,586.01 rows=9,549 width=1,655) (actual time=8.044..15.234 rows=192 loops=5)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.177 15.053 ↑ 49.7 192 5 / 5

Hash Left Join (cost=2,006.08..12,539.96 rows=9,549 width=1,655) (actual time=8.029..15.053 rows=192 loops=5)

  • Hash Cond: (si_1.paymentadvice_id = fi_ipa.id)
4. 0.188 14.872 ↑ 49.7 192 5 / 5

Hash Left Join (cost=1,995.86..12,504.67 rows=9,549 width=611) (actual time=8.014..14.872 rows=192 loops=5)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.930 13.400 ↑ 49.7 192 5 / 5

Nested Loop Left Join (cost=1,963.60..12,447.34 rows=9,549 width=597) (actual time=6.717..13.400 rows=192 loops=5)

6. 0.186 12.085 ↑ 49.7 192 5 / 5

Hash Left Join (cost=1,963.16..7,696.64 rows=9,549 width=597) (actual time=6.705..12.085 rows=192 loops=5)

  • Hash Cond: (si.currency_id = c.id)
7. 0.185 11.889 ↑ 49.7 192 5 / 5

Hash Left Join (cost=1,962.03..7,652.73 rows=9,549 width=601) (actual time=6.684..11.889 rows=192 loops=5)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.188 10.666 ↑ 49.7 192 5 / 5

Hash Left Join (cost=1,750.90..7,416.47 rows=9,549 width=591) (actual time=5.632..10.666 rows=192 loops=5)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.268 9.286 ↑ 49.7 192 5 / 5

Nested Loop Left Join (cost=1,539.78..7,180.22 rows=9,549 width=581) (actual time=4.428..9.286 rows=192 loops=5)

10. 0.211 8.633 ↑ 49.7 192 5 / 5

Hash Left Join (cost=1,539.36..2,747.16 rows=9,549 width=465) (actual time=4.419..8.633 rows=192 loops=5)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
11. 0.328 8.368 ↑ 49.7 192 5 / 5

Merge Join (cost=1,536.18..2,612.68 rows=9,549 width=455) (actual time=4.319..8.368 rows=192 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
12. 0.771 5.879 ↑ 3,122.5 526 5 / 5

Nested Loop Left Join (cost=1.71..3,300,613.68 rows=1,642,460 width=395) (actual time=0.036..5.879 rows=526 loops=5)

13. 0.801 5.108 ↑ 3,122.5 526 5 / 5

Nested Loop Left Join (cost=1.29..2,520,800.73 rows=1,642,460 width=387) (actual time=0.029..5.108 rows=526 loops=5)

14. 0.894 2.730 ↑ 3,122.5 526 5 / 5

Nested Loop Left Join (cost=0.86..1,786,202.47 rows=1,642,460 width=371) (actual time=0.023..2.730 rows=526 loops=5)

15. 0.259 0.259 ↑ 3,122.5 526 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.008..0.259 rows=526 loops=5)

16. 1.577 1.577 ↓ 0.0 0 2,629 / 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=2,629)

  • Index Cond: (invoice_id = si.id)
17. 1.577 1.577 ↓ 0.0 0 2,629 / 5

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement ps_apfeps (cost=0.42..0.45 rows=1 width=24) (actual time=0.003..0.003 rows=0 loops=2,629)

  • Index Cond: (ps_eps.id = id)
18. 0.000 0.000 ↓ 0.0 0 2,629 / 5

Index Scan using financingcontextbase_pkey on financingcontextbase ps_apffc_fc_fcb (cost=0.42..0.47 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=2,629)

  • Index Cond: (id = ps_apfeps.financingcontext_id)
19. 0.068 2.161 ↓ 259.0 259 4 / 5

Materialize (cost=1,534.46..1,534.47 rows=1 width=68) (actual time=2.610..2.701 rows=259 loops=4)

20. 0.042 2.093 ↓ 32.0 32 4 / 5

Sort (cost=1,534.46..1,534.47 rows=1 width=68) (actual time=2.607..2.616 rows=32 loops=4)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 32kB
  • Worker 0: Sort Method: quicksort Memory: 32kB
  • Worker 2: Sort Method: quicksort Memory: 32kB
  • Worker 3: Sort Method: quicksort Memory: 32kB
21. 0.114 2.051 ↓ 51.0 51 4 / 5

Nested Loop Left Join (cost=2.15..1,534.45 rows=1 width=68) (actual time=0.122..2.564 rows=51 loops=4)

  • Join Filter: (si_1.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 322
22. 0.124 1.855 ↓ 51.0 51 4 / 5

Nested Loop (cost=2.15..1,533.14 rows=1 width=56) (actual time=0.116..2.319 rows=51 loops=4)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 344
23. 0.068 1.650 ↓ 51.0 51 4 / 5

Nested Loop (cost=2.15..1,531.69 rows=1 width=64) (actual time=0.108..2.062 rows=51 loops=4)

  • Join Filter: (fi_eps_1.invoice_id = si_1.id)
24. 0.026 1.500 ↓ 51.0 51 4 / 5

Nested Loop (cost=1.72..1,531.06 rows=1 width=72) (actual time=0.098..1.875 rows=51 loops=4)

25. 0.035 1.392 ↓ 10.2 51 4 / 5

Nested Loop (cost=1.29..1,528.83 rows=5 width=64) (actual time=0.091..1.740 rows=51 loops=4)

26. 0.238 1.275 ↓ 10.2 51 4 / 5

Nested Loop (cost=0.86..1,525.61 rows=5 width=24) (actual time=0.084..1.594 rows=51 loops=4)

  • Join Filter: (fi_ps_apfeps_1.apfda_id = fi_ps_apfeps_t_apfda_1.id)
  • Rows Removed by Join Filter: 691
27. 0.122 0.899 ↓ 9.1 172 4 / 5

Nested Loop (cost=0.86..1,522.97 rows=19 width=32) (actual time=0.027..1.124 rows=172 loops=4)

28. 0.185 0.502 ↓ 1.2 172 4 / 5

Nested Loop (cost=0.43..1,457.55 rows=146 width=32) (actual time=0.018..0.628 rows=172 loops=4)

29. 0.042 0.042 ↑ 1.0 172 4 / 5

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

30. 0.275 0.275 ↑ 1.0 1 688 / 5

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement fi_eps_1 (cost=0.43..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=688)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
31. 0.275 0.275 ↑ 1.0 1 688 / 5

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement fi_ps_apfeps_1 (cost=0.42..0.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=688)

  • Index Cond: (id = fi_eps_1.id)
32. 0.132 0.138 ↑ 1.2 4 688 / 5

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

33. 0.006 0.006 ↑ 1.0 5 4 / 5

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

  • Filter: (bank_id = 3053)
  • Rows Removed by Filter: 15
34. 0.082 0.082 ↑ 1.0 1 204 / 5

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement fi_eps (cost=0.43..0.64 rows=1 width=40) (actual time=0.002..0.002 rows=1 loops=204)

  • Index Cond: (invoice_id = fi_eps_1.invoice_id)
35. 0.082 0.082 ↑ 1.0 1 204 / 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=204)

  • Index Cond: (id = fi_eps.id)
36. 0.082 0.082 ↑ 1.0 1 204 / 5

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

  • Index Cond: (id = fi_eps.invoice_id)
37. 0.082 0.082 ↑ 2.5 8 204 / 5

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=8) (actual time=0.001..0.002 rows=8 loops=204)

38. 0.082 0.082 ↑ 2.0 7 204 / 5

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=28) (actual time=0.001..0.002 rows=7 loops=204)

39. 0.011 0.054 ↑ 1.0 20 4 / 5

Hash (cost=2.93..2.93 rows=20 width=26) (actual time=0.067..0.068 rows=20 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
40. 0.012 0.043 ↑ 1.0 20 4 / 5

Merge Right Join (cost=2.05..2.93 rows=20 width=26) (actual time=0.035..0.054 rows=20 loops=4)

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
41. 0.010 0.010 ↑ 275.0 6 4 / 5

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.010..0.012 rows=6 loops=4)

42. 0.015 0.022 ↑ 1.0 20 4 / 5

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.022..0.027 rows=20 loops=4)

  • Sort Key: ps_apfeps_t_apfda.bank_id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 2: Sort Method: quicksort Memory: 25kB
  • Worker 3: Sort Method: quicksort Memory: 25kB
43. 0.006 0.006 ↑ 1.0 20 4 / 5

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

44. 0.385 0.385 ↑ 1.0 1 962 / 5

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

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
45. 0.482 1.192 ↑ 1.0 1,650 4 / 5

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
46. 0.710 0.710 ↑ 1.0 1,650 4 / 5

Seq Scan on corporatebase od_c_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.006..0.887 rows=1,650 loops=4)

47. 0.462 1.038 ↑ 1.0 1,650 4 / 5

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
48. 0.577 0.577 ↑ 1.0 1,650 4 / 5

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

49. 0.004 0.010 ↑ 1.0 6 4 / 5

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.012..0.012 rows=6 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
50. 0.006 0.006 ↑ 1.0 6 4 / 5

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.005..0.007 rows=6 loops=4)

51. 0.385 0.385 ↑ 1.0 1 962 / 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=962)

  • Index Cond: (si.importbatch_id = id)
52. 0.254 1.284 ↑ 1.0 945 4 / 5

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=1.605..1.605 rows=945 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
53. 1.030 1.030 ↑ 1.0 945 4 / 5

Seq Scan on earlypaymentadvice fi_eps_epa (cost=0.00..20.45 rows=945 width=30) (actual time=0.004..1.287 rows=945 loops=4)

54. 0.001 0.004 ↓ 0.0 0 4 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
55. 0.003 0.003 ↓ 0.0 0 4 / 5

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

56. 0.001 0.003 ↓ 0.0 0 4 / 5

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

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

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

58.          

SubPlan (for Gather)

59. 0.962 0.962 ↑ 1.0 1 962

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

60. 0.000 0.000 ↓ 0.0 0 962

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

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 15.087 ms
Execution time : 41.995 ms