explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8E5T

Settings
# exclusive inclusive rows x rows loops node
1. 22.162 215.908 ↓ 8.3 962 1

Gather (cost=15,836.58..18,030.71 rows=116 width=1,810) (actual time=196.591..215.908 rows=962 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.340 192.784 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,836.58..16,071.10 rows=29 width=1,655) (actual time=184.100..192.784 rows=192 loops=5)

3. 0.324 192.444 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,836.44..16,066.39 rows=29 width=1,655) (actual time=184.090..192.444 rows=192 loops=5)

4. 0.198 192.120 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,836.31..16,061.95 rows=29 width=611) (actual time=184.079..192.120 rows=192 loops=5)

5. 0.373 191.537 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,836.03..16,053.46 rows=29 width=597) (actual time=184.066..191.537 rows=192 loops=5)

6. 0.212 190.010 ↓ 6.6 192 5 / 5

Hash Left Join (cost=14,835.60..16,039.03 rows=29 width=597) (actual time=184.050..190.010 rows=192 loops=5)

  • Hash Cond: (si.currency_id = c.id)
7. 1.164 189.784 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,834.46..16,037.77 rows=29 width=601) (actual time=184.020..189.784 rows=192 loops=5)

8. 0.223 188.428 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,834.19..16,029.21 rows=29 width=591) (actual time=184.009..188.428 rows=192 loops=5)

9. 0.348 187.820 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,833.91..15,846.65 rows=29 width=581) (actual time=183.997..187.820 rows=192 loops=5)

10. 0.336 187.087 ↓ 6.6 192 5 / 5

Nested Loop Left Join (cost=14,833.49..15,833.18 rows=29 width=465) (actual time=183.980..187.087 rows=192 loops=5)

11. 0.185 186.751 ↓ 6.6 192 5 / 5

Hash Left Join (cost=14,833.07..15,819.42 rows=29 width=457) (actual time=183.970..186.751 rows=192 loops=5)

  • Hash Cond: (ps_apfeps_t_apfda.bank_id = ps_eps_t_bc_cb.id)
  • Filter: ((ps_eps_t_bc_cb.id = 3053) OR (ps_eps_t_bc_cb.id IS NULL))
12. 0.182 185.021 ↑ 248.7 192 5 / 5

Hash Left Join (cost=14,621.94..15,482.56 rows=47,746 width=447) (actual time=182.410..185.021 rows=192 loops=5)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
13. 2.294 184.819 ↑ 248.7 192 5 / 5

Parallel Hash Left Join (cost=14,620.49..15,329.22 rows=47,746 width=447) (actual time=182.371..184.819 rows=192 loops=5)

  • Hash Cond: (ps_eps.id = ps_apfeps.id)
14. 0.354 5.517 ↑ 248.7 192 5 / 5

Merge Join (cost=1,531.96..2,115.36 rows=47,746 width=431) (actual time=3.564..5.517 rows=192 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
15. 0.640 1.973 ↑ 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.045..1.973 rows=526 loops=5)

16. 0.281 0.281 ↑ 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.019..0.281 rows=526 loops=5)

17. 1.052 1.052 ↓ 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.002..0.002 rows=0 loops=2,629)

  • Index Cond: (invoice_id = si.id)
18. 0.123 3.190 ↓ 42.2 211 5 / 5

Sort (cost=1,531.10..1,531.11 rows=5 width=68) (actual time=3.126..3.190 rows=211 loops=5)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 32kB
  • Worker 0: Sort Method: quicksort Memory: 32kB
  • Worker 1: Sort Method: quicksort Memory: 32kB
  • Worker 2: Sort Method: quicksort Memory: 32kB
  • Worker 3: Sort Method: quicksort Memory: 32kB
19. 0.171 3.067 ↓ 10.2 51 5 / 5

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

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 322
20. 0.095 2.794 ↓ 10.2 51 5 / 5

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

21. 0.392 2.597 ↓ 10.2 51 5 / 5

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

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 691
22. 0.205 2.033 ↓ 9.1 172 5 / 5

Nested Loop (cost=0.86..1,522.97 rows=19 width=64) (actual time=0.036..2.033 rows=172 loops=5)

23. 0.212 1.484 ↓ 1.2 172 5 / 5

Nested Loop (cost=0.43..1,457.55 rows=146 width=56) (actual time=0.024..1.484 rows=172 loops=5)

24. 0.068 0.068 ↑ 1.0 172 5 / 5

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

25. 1.204 1.204 ↑ 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.007..0.007 rows=1 loops=860)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
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.161 0.172 ↑ 1.2 4 860 / 5

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

28. 0.011 0.011 ↑ 1.0 5 5 / 5

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

  • Filter: (bank_id = 3053)
  • Rows Removed by Filter: 15
29. 0.102 0.102 ↑ 1.0 1 255 / 5

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

  • Index Cond: (id = fi_eps.invoice_id)
30. 0.090 0.102 ↑ 2.0 7 255 / 5

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

31. 0.012 0.012 ↑ 1.0 14 5 / 5

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

32. 105.864 177.008 ↑ 2.1 166,262 5 / 5

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

  • Buckets: 1048576 Batches: 1 Memory Usage: 53824kB
33. 71.144 71.144 ↑ 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.006..71.144 rows=166,262 loops=5)

34. 0.010 0.020 ↑ 1.0 20 5 / 5

Hash (cost=1.20..1.20 rows=20 width=16) (actual time=0.020..0.020 rows=20 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
35. 0.010 0.010 ↑ 1.0 20 5 / 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=5)

36. 0.670 1.545 ↑ 1.0 1,650 5 / 5

Hash (cost=190.50..190.50 rows=1,650 width=26) (actual time=1.544..1.545 rows=1,650 loops=5)

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

Seq Scan on corporatebase ps_eps_t_bc_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.007..0.875 rows=1,650 loops=5)

38. 0.000 0.000 ↓ 0.0 0 962 / 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=962)

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

Index Scan using corporatebase_pkey on corporatebase od_c_cb (cost=0.28..6.29 rows=1 width=26) (actual time=0.002..0.002 rows=1 loops=962)

  • Index Cond: (id = od_db.buyer_id)
41. 0.192 0.192 ↑ 1.0 1 962 / 5

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..0.30 rows=1 width=26) (actual time=0.001..0.001 rows=1 loops=962)

  • Index Cond: (id = si.supplier_id)
42. 0.005 0.014 ↑ 1.0 6 5 / 5

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.014..0.014 rows=6 loops=5)

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

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

44. 1.154 1.154 ↑ 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.006..0.006 rows=1 loops=962)

  • Index Cond: (si.importbatch_id = id)
45. 0.385 0.385 ↑ 1.0 1 962 / 5

Index Scan using earlypaymentadvice_pkey on earlypaymentadvice fi_eps_epa (cost=0.28..0.29 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=962)

  • Index Cond: (id = fi_eps.earlypaymentadvice_id)
46. 0.000 0.000 ↓ 0.0 0 962 / 5

Index Scan using invoicepaymentadvice_pkey on invoicepaymentadvice fi_ipa (cost=0.14..0.15 rows=1 width=1,052) (actual time=0.000..0.000 rows=0 loops=962)

  • Index Cond: (fi_si.paymentadvice_id = id)
47. 0.000 0.000 ↓ 0.0 0 962 / 5

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction fi_bpt (cost=0.14..0.15 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=962)

  • Index Cond: (mapping_id = fi_eps.earlypaymentmapping_id)
48.          

SubPlan (for Gather)

49. 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)

50. 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 : 9.841 ms
Execution time : 216.492 ms