explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7bpC

Settings
# exclusive inclusive rows x rows loops node
1. 9.065 23.737 ↑ 209.6 911 1

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

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.155 9.206 ↑ 262.3 182 5 / 5

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

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

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

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

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

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

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

6. 0.159 7.064 ↑ 262.3 182 5 / 5

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

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

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

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

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

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

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

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

11. 0.111 2.903 ↓ 41.8 209 5 / 5

Sort (cost=1,533.42..1,533.43 rows=5 width=192) (actual time=2.840..2.903 rows=209 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
12. 0.073 2.792 ↓ 10.2 51 5 / 5

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

13. 0.164 2.617 ↓ 10.2 51 5 / 5

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

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

Nested Loop (cost=1.29..1,528.81 rows=5 width=64) (actual time=0.100..2.351 rows=51 loops=5)

15. 0.375 2.159 ↓ 10.2 51 5 / 5

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

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

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

17. 0.160 1.078 ↓ 1.2 172 5 / 5

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

18. 0.058 0.058 ↑ 1.0 172 5 / 5

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

19. 0.860 0.860 ↑ 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.005..0.005 rows=1 loops=860)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
20. 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)
21. 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)

22. 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
23. 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)
24. 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)

25. 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.004..0.012 rows=14 loops=5)

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

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
27. 0.629 1.539 ↑ 1.0 1,650 5 / 5

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

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

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

29. 0.624 1.413 ↑ 1.0 1,650 5 / 5

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

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

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

31. 0.006 0.014 ↑ 1.0 6 5 / 5

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

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

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

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.359 0.693 ↑ 1.0 945 5 / 5

Hash (cost=20.45..20.45 rows=945 width=30) (actual time=0.693..0.693 rows=945 loops=5)

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

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

36. 0.001 0.005 ↓ 0.0 0 5 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
37. 0.004 0.004 ↓ 0.0 0 5 / 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=5)

38. 0.001 0.004 ↓ 0.0 0 5 / 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
39. 0.003 0.003 ↓ 0.0 0 5 / 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=5)

40.          

SubPlan (for Gather)

41. 5.466 5.466 ↑ 1.0 1 911

Aggregate (cost=8.15..8.16 rows=1 width=8) (actual time=0.001..0.006 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.842 ms
Execution time : 24.278 ms