explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wAjd9

Settings
# exclusive inclusive rows x rows loops node
1. 23.799 35.844 ↑ 209.6 911 1

Gather (cost=3,010.38..1,607,831.11 rows=190,984 width=2,716) (actual time=7.773..35.844 rows=911 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.136 10.223 ↑ 262.3 182 5 / 5

Hash Left Join (cost=2,010.38..26,915.97 rows=47,746 width=1,433) (actual time=5.894..10.223 rows=182 loops=5)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.129 10.083 ↑ 262.3 182 5 / 5

Hash Left Join (cost=2,000.16..26,726.69 rows=47,746 width=1,433) (actual time=5.881..10.083 rows=182 loops=5)

  • Hash Cond: (fi_si.paymentadvice_id = fi_ipa.id)
4. 0.140 9.952 ↑ 262.3 182 5 / 5

Hash Left Join (cost=1,989.93..26,591.13 rows=47,746 width=389) (actual time=5.873..9.952 rows=182 loops=5)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.174 9.447 ↑ 262.3 182 5 / 5

Nested Loop Left Join (cost=1,957.67..26,433.54 rows=47,746 width=375) (actual time=5.500..9.447 rows=182 loops=5)

6. 0.131 8.909 ↑ 262.3 182 5 / 5

Hash Left Join (cost=1,957.24..2,679.55 rows=47,746 width=375) (actual time=5.493..8.909 rows=182 loops=5)

  • Hash Cond: (si.currency_id = c.id)
7. 0.133 8.771 ↑ 262.3 182 5 / 5

Hash Left Join (cost=1,956.10..2,464.55 rows=47,746 width=379) (actual time=5.478..8.771 rows=182 loops=5)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.157 7.068 ↑ 262.3 182 5 / 5

Hash Left Join (cost=1,744.98..2,127.77 rows=47,746 width=369) (actual time=3.900..7.068 rows=182 loops=5)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.393 6.035 ↑ 262.3 182 5 / 5

Merge Join (cost=1,533.85..1,790.98 rows=47,746 width=359) (actual time=2.992..6.035 rows=182 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
  • Join Filter: (si.id <> nb.surplus_id)
  • Rows Removed by Join Filter: 10
10. 2.644 2.644 ↑ 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.009..2.644 rows=526 loops=5)

11. 0.077 2.998 ↓ 66.0 330 3 / 5

Sort (cost=1,533.42..1,533.43 rows=5 width=192) (actual time=4.915..4.997 rows=330 loops=3)

  • Sort Key: nb.id
  • Sort Method: quicksort Memory: 32kB
  • Worker 2: Sort Method: quicksort Memory: 32kB
  • Worker 3: Sort Method: quicksort Memory: 32kB
12. 0.037 2.921 ↓ 10.2 51 3 / 5

Nested Loop Left Join (cost=1.71..1,533.36 rows=5 width=192) (actual time=0.118..4.869 rows=51 loops=3)

13. 0.082 2.823 ↓ 10.2 51 3 / 5

Nested Loop Left Join (cost=1.29..1,531.04 rows=5 width=76) (actual time=0.106..4.705 rows=51 loops=3)

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 322
14. 0.049 2.680 ↓ 10.2 51 3 / 5

Nested Loop (cost=1.29..1,528.81 rows=5 width=64) (actual time=0.095..4.466 rows=51 loops=3)

15. 0.198 2.570 ↓ 10.2 51 3 / 5

Nested Loop (cost=0.86..1,525.61 rows=5 width=56) (actual time=0.086..4.283 rows=51 loops=3)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 691
16. 0.092 2.269 ↓ 9.1 172 3 / 5

Nested Loop (cost=0.86..1,522.97 rows=19 width=64) (actual time=0.025..3.781 rows=172 loops=3)

17. 0.081 1.970 ↓ 1.2 172 3 / 5

Nested Loop (cost=0.43..1,457.55 rows=146 width=56) (actual time=0.017..3.283 rows=172 loops=3)

18. 0.031 0.031 ↑ 1.0 172 3 / 5

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (actual time=0.007..0.052 rows=172 loops=3)

19. 1.858 1.858 ↑ 1.0 1 516 / 5

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement fi_eps (cost=0.43..8.45 rows=1 width=40) (actual time=0.018..0.018 rows=1 loops=516)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
20. 0.206 0.206 ↑ 1.0 1 516 / 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=516)

  • Index Cond: (id = fi_eps.id)
21. 0.097 0.103 ↑ 1.2 4 516 / 5

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

22. 0.006 0.006 ↑ 1.0 5 3 / 5

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

  • Filter: (bank_id = 3053)
  • Rows Removed by Filter: 15
23. 0.061 0.061 ↑ 1.0 1 153 / 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=153)

  • Index Cond: (id = fi_eps.invoice_id)
24. 0.055 0.061 ↑ 2.0 7 153 / 5

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

25. 0.007 0.007 ↑ 1.0 14 3 / 5

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=28) (actual time=0.004..0.011 rows=14 loops=3)

26. 0.061 0.061 ↑ 1.0 1 153 / 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=153)

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
27. 0.350 0.876 ↑ 1.0 1,650 3 / 5

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
28. 0.526 0.526 ↑ 1.0 1,650 3 / 5

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

29. 1.138 1.570 ↑ 1.0 1,650 3 / 5

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

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

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

31. 0.003 0.007 ↑ 1.0 6 3 / 5

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

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

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

33. 0.364 0.364 ↑ 1.0 1 911 / 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=911)

  • Index Cond: (si.importbatch_id = id)
34. 0.187 0.365 ↑ 1.0 945 3 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
35. 0.178 0.178 ↑ 1.0 945 3 / 5

Seq Scan on earlypaymentadvice fi_eps_epa (cost=0.00..20.45 rows=945 width=30) (actual time=0.005..0.297 rows=945 loops=3)

36. 0.001 0.002 ↓ 0.0 0 3 / 5

Hash (cost=10.10..10.10 rows=10 width=1,052) (actual time=0.003..0.004 rows=0 loops=3)

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

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

38. 0.003 0.004 ↓ 0.0 0 3 / 5

Hash (cost=10.10..10.10 rows=10 width=16) (actual time=0.007..0.007 rows=0 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
39. 0.001 0.001 ↓ 0.0 0 3 / 5

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

40.          

SubPlan (for Gather)

41. 1.822 1.822 ↑ 1.0 1 911

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

42. 0.000 0.000 ↓ 0.0 0 911

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

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 9.883 ms
Execution time : 36.362 ms