explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4ZSN

Settings
# exclusive inclusive rows x rows loops node
1. 11.351 791.910 ↑ 1,390.0 1 1

Gather (cost=2,829.80..17,552.67 rows=1,390 width=1,810) (actual time=7.909..791.910 rows=1 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.002 780.552 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,829.80..5,053.89 rows=348 width=1,655) (actual time=623.984..780.552 rows=0 loops=5)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.003 780.550 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,819.58..5,042.35 rows=348 width=1,655) (actual time=623.982..780.550 rows=0 loops=5)

  • Hash Cond: (fi_si.paymentadvice_id = fi_ipa.id)
4. 0.002 780.547 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,809.35..5,031.21 rows=348 width=611) (actual time=623.979..780.547 rows=0 loops=5)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.001 780.432 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,777.09..4,998.04 rows=348 width=597) (actual time=623.865..780.432 rows=0 loops=5)

6. 0.002 780.430 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,776.66..2,571.70 rows=348 width=597) (actual time=623.862..780.430 rows=0 loops=5)

  • Hash Cond: (si.currency_id = c.id)
7. 0.002 780.427 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,775.52..2,569.00 rows=348 width=601) (actual time=623.859..780.427 rows=0 loops=5)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.002 780.424 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,767.22..2,555.91 rows=348 width=591) (actual time=623.856..780.424 rows=0 loops=5)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.002 780.126 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,556.09..2,343.87 rows=348 width=581) (actual time=623.558..780.126 rows=0 loops=5)

10. 0.001 780.123 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,555.67..2,182.32 rows=348 width=465) (actual time=623.556..780.123 rows=0 loops=5)

11. 0.002 780.121 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,555.25..2,017.09 rows=348 width=457) (actual time=623.554..780.121 rows=0 loops=5)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
12. 0.001 780.108 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,552.07..2,009.13 rows=348 width=447) (actual time=623.542..780.108 rows=0 loops=5)

13. 0.002 780.106 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,551.64..1,853.19 rows=348 width=431) (actual time=623.540..780.106 rows=0 loops=5)

  • Hash Cond: (fi_si.originatordivision_id = od_db.id)
14. 0.051 780.101 ↓ 0.0 0 5 / 5

Hash Join (cost=1,550.33..1,850.68 rows=348 width=419) (actual time=623.534..780.101 rows=0 loops=5)

  • Hash Cond: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
15. 0.003 780.026 ↓ 0.0 0 5 / 5

Merge Join (cost=1,548.88..1,848.13 rows=348 width=427) (actual time=623.460..780.026 rows=0 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
16. 0.018 779.659 ↑ 2,716.0 1 5 / 5

Nested Loop (cost=0.86..812,437.47 rows=2,716 width=371) (actual time=623.094..779.659 rows=1 loops=5)

17. 779.570 779.570 ↑ 91.5 36 5 / 5

Parallel Index Scan using supplierinvoice_nettingbundle_idx on supplierinvoice si (cost=0.43..788,544.54 rows=3,294 width=191) (actual time=622.770..779.570 rows=36 loops=5)

  • Filter: (supplier_id = 6167)
  • Rows Removed by Filter: 1003243
18. 0.071 0.071 ↓ 0.0 0 178 / 5

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement ps_eps (cost=0.43..7.25 rows=1 width=196) (actual time=0.002..0.002 rows=0 loops=178)

  • Index Cond: (invoice_id = si.id)
  • Filter: (creationdate >= '2019-01-01'::date)
19. 0.016 0.364 ↑ 11.0 2 1 / 5

Sort (cost=1,548.01..1,548.07 rows=22 width=64) (actual time=1.819..1.819 rows=2 loops=1)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 38kB
20. 0.052 0.348 ↓ 7.8 172 1 / 5

Nested Loop (cost=1.29..1,547.52 rows=22 width=64) (actual time=0.021..1.738 rows=172 loops=1)

21. 0.034 0.226 ↓ 7.8 172 1 / 5

Nested Loop (cost=0.86..1,534.05 rows=22 width=64) (actual time=0.014..1.132 rows=172 loops=1)

22. 0.044 0.123 ↑ 1.0 172 1 / 5

Nested Loop (cost=0.43..1,457.12 rows=172 width=56) (actual time=0.008..0.617 rows=172 loops=1)

23. 0.011 0.011 ↑ 1.0 172 1 / 5

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

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

  • Index Cond: (invoice_id = nb.surplus_id)
25. 0.069 0.069 ↑ 1.0 1 172 / 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=172)

  • Index Cond: (id = fi_eps.id)
26. 0.069 0.069 ↑ 1.0 1 172 / 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=172)

  • Index Cond: (id = fi_eps.invoice_id)
27. 0.010 0.024 ↑ 1.0 20 5 / 5

Hash (cost=1.20..1.20 rows=20 width=8) (actual time=0.024..0.024 rows=20 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
28. 0.014 0.014 ↑ 1.0 20 5 / 5

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=8) (actual time=0.009..0.014 rows=20 loops=5)

29. 0.001 0.003 ↑ 1.0 14 1 / 5

Hash (cost=1.14..1.14 rows=14 width=28) (actual time=0.017..0.017 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.002 0.002 ↑ 1.0 14 1 / 5

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

31. 0.001 0.001 ↑ 1.0 1 1 / 5

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement ps_apfeps (cost=0.42..0.45 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (ps_eps.id = id)
32. 0.002 0.011 ↑ 1.0 20 1 / 5

Hash (cost=2.93..2.93 rows=20 width=26) (actual time=0.053..0.053 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
33. 0.003 0.009 ↑ 1.0 20 1 / 5

Merge Right Join (cost=2.05..2.93 rows=20 width=26) (actual time=0.027..0.045 rows=20 loops=1)

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
34. 0.002 0.002 ↑ 275.0 6 1 / 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.008..0.010 rows=6 loops=1)

35. 0.003 0.004 ↑ 1.0 20 1 / 5

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.016..0.021 rows=20 loops=1)

  • Sort Key: ps_apfeps_t_apfda.bank_id
  • Sort Method: quicksort Memory: 25kB
36. 0.001 0.001 ↑ 1.0 20 1 / 5

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

37. 0.001 0.001 ↑ 1.0 1 1 / 5

Index Scan using financingcontextbase_pkey on financingcontextbase ps_apffc_fc_fcb (cost=0.42..0.47 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (id = ps_apfeps.financingcontext_id)
38. 0.001 0.001 ↑ 1.0 1 1 / 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.007..0.007 rows=1 loops=1)

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
39. 0.105 0.296 ↑ 1.0 1,650 1 / 5

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
40. 0.191 0.191 ↑ 1.0 1,650 1 / 5

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

41. 0.000 0.001 ↑ 1.0 1 1 / 5

Hash (cost=8.29..8.29 rows=1 width=26) (actual time=0.007..0.007 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
42. 0.001 0.001 ↑ 1.0 1 1 / 5

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..8.29 rows=1 width=26) (actual time=0.005..0.006 rows=1 loops=1)

  • Index Cond: (id = 6167)
43. 0.001 0.001 ↑ 1.0 6 1 / 5

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.007..0.007 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
44. 0.001 0.001 ↑ 1.0 6 1 / 5

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.002..0.004 rows=6 loops=1)

45. 0.001 0.001 ↑ 1.0 1 1 / 5

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..6.97 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (si.importbatch_id = id)
46. 0.057 0.113 ↑ 1.0 945 1 / 5

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=0.564..0.564 rows=945 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
47. 0.056 0.056 ↑ 1.0 945 1 / 5

Seq Scan on earlypaymentadvice fi_eps_epa (cost=0.00..20.45 rows=945 width=30) (actual time=0.003..0.279 rows=945 loops=1)

48. 0.000 0.000 ↓ 0.0 0 1 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
49. 0.000 0.000 ↓ 0.0 0 1 / 5

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

50. 0.000 0.000 ↓ 0.0 0 1 / 5

Hash (cost=10.10..10.10 rows=10 width=16) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
51. 0.000 0.000 ↓ 0.0 0 1 / 5

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

52.          

SubPlan (for Gather)

53. 0.003 0.007 ↑ 1.0 1 1

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

54. 0.004 0.004 ↓ 0.0 0 1

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt (cost=0.14..8.15 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 8.950 ms
Execution time : 792.277 ms