explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Erv

Settings
# exclusive inclusive rows x rows loops node
1. 27.565 388.918 ↑ 198.5 962 1

Gather (cost=33,298.10..1,639,098.64 rows=190,984 width=1,810) (actual time=362.746..388.918 rows=962 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.201 360.391 ↑ 248.7 192 5 / 5

Hash Left Join (cost=32,298.10..58,183.50 rows=47,746 width=1,655) (actual time=354.476..360.391 rows=192 loops=5)

  • Hash Cond: (fi_eps.earlypaymentmapping_id = fi_bpt.mapping_id)
3. 0.188 360.186 ↑ 248.7 192 5 / 5

Hash Left Join (cost=32,287.87..57,994.22 rows=47,746 width=1,655) (actual time=354.457..360.186 rows=192 loops=5)

  • Hash Cond: (fi_si.paymentadvice_id = fi_ipa.id)
4. 0.204 359.993 ↑ 248.7 192 5 / 5

Hash Left Join (cost=32,277.65..57,858.66 rows=47,746 width=611) (actual time=354.435..359.993 rows=192 loops=5)

  • Hash Cond: (fi_eps.earlypaymentadvice_id = fi_eps_epa.id)
5. 0.312 359.090 ↑ 248.7 192 5 / 5

Nested Loop Left Join (cost=32,245.38..57,701.06 rows=47,746 width=597) (actual time=353.721..359.090 rows=192 loops=5)

6. 0.199 358.393 ↑ 248.7 192 5 / 5

Hash Left Join (cost=32,244.95..33,947.07 rows=47,746 width=597) (actual time=353.704..358.393 rows=192 loops=5)

  • Hash Cond: (si.currency_id = c.id)
7. 0.207 358.180 ↑ 248.7 192 5 / 5

Hash Left Join (cost=32,243.82..33,732.07 rows=47,746 width=601) (actual time=353.672..358.180 rows=192 loops=5)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.204 356.491 ↑ 248.7 192 5 / 5

Hash Left Join (cost=32,032.69..33,395.29 rows=47,746 width=591) (actual time=352.173..356.491 rows=192 loops=5)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.992 353.175 ↑ 248.7 192 5 / 5

Parallel Hash Left Join (cost=31,821.57..33,058.51 rows=47,746 width=581) (actual time=349.044..353.175 rows=192 loops=5)

  • Hash Cond: (fi_ps_apfeps.financingcontext_id = fi_ps_apffc_fc_afc.id)
10. 0.190 289.487 ↑ 248.7 192 5 / 5

Hash Left Join (cost=24,676.48..25,788.09 rows=47,746 width=465) (actual time=285.700..289.487 rows=192 loops=5)

  • Hash Cond: (ps_apfeps_t_apfda.bank_id = ps_eps_t_bc_cb.id)
11. 0.184 287.699 ↑ 248.7 192 5 / 5

Hash Left Join (cost=24,465.35..25,451.31 rows=47,746 width=455) (actual time=284.085..287.699 rows=192 loops=5)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
12. 0.813 287.495 ↑ 248.7 192 5 / 5

Parallel Hash Left Join (cost=24,463.90..25,297.97 rows=47,746 width=455) (actual time=284.048..287.495 rows=192 loops=5)

  • Hash Cond: (ps_apfeps.financingcontext_id = ps_apffc_fc_fcb.id)
13. 2.461 192.829 ↑ 248.7 192 5 / 5

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

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

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

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

16. 0.283 0.283 ↑ 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.024..0.283 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.121 2.473 ↓ 42.6 213 5 / 5

Sort (cost=1,531.10..1,531.11 rows=5 width=68) (actual time=2.406..2.473 rows=213 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.139 2.352 ↓ 10.2 51 5 / 5

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

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

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

21. 0.251 1.859 ↓ 10.2 51 5 / 5

Nested Loop (cost=0.86..1,525.61 rows=5 width=56) (actual time=0.102..1.859 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.226 1.264 ↓ 9.1 172 5 / 5

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

23. 0.283 0.694 ↓ 1.2 172 5 / 5

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

24. 0.067 0.067 ↑ 1.0 172 5 / 5

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

25. 0.344 0.344 ↑ 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.002..0.002 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.334 0.344 ↑ 1.2 4 860 / 5

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

28. 0.010 0.010 ↑ 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.010 rows=5 loops=5)

  • Filter: (bank_id = 3,053)
  • Rows Removed by Filter: 15
29. 0.153 0.153 ↑ 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.003..0.003 rows=1 loops=255)

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

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

31. 0.013 0.013 ↑ 1.0 14 5 / 5

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

32. 111.490 184.891 ↑ 2.1 166,262 5 / 5

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

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 53,824kB
33. 73.401 73.401 ↑ 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..73.401 rows=166,262 loops=5)

34. 53.859 93.853 ↑ 2.1 78,899 5 / 5

Parallel Hash (cost=7,788.74..7,788.74 rows=164,374 width=24) (actual time=93.853..93.853 rows=78,899 loops=5)

  • Buckets: 524,288 Batches: 1 Memory Usage: 26,688kB
35. 39.994 39.994 ↑ 2.1 78,899 5 / 5

Parallel Seq Scan on financingcontextbase ps_apffc_fc_fcb (cost=0.00..7,788.74 rows=164,374 width=24) (actual time=0.006..39.994 rows=78,899 loops=5)

36. 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: 1,024 Batches: 1 Memory Usage: 9kB
37. 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)

38. 0.689 1.598 ↑ 1.0 1,650 5 / 5

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 119kB
39. 0.909 0.909 ↑ 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.909 rows=1,650 loops=5)

40. 37.312 62.696 ↑ 2.1 47,959 5 / 5

Parallel Hash (cost=5,896.15..5,896.15 rows=99,915 width=132) (actual time=62.695..62.696 rows=47,959 loops=5)

  • Buckets: 262,144 Batches: 1 Memory Usage: 20,896kB
41. 25.384 25.384 ↑ 2.1 47,959 5 / 5

Parallel Seq Scan on apffinancingcontext fi_ps_apffc_fc_afc (cost=0.00..5,896.15 rows=99,915 width=132) (actual time=0.005..25.384 rows=47,959 loops=5)

42. 0.679 3.112 ↑ 1.0 1,650 5 / 5

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 119kB
43. 2.433 2.433 ↑ 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.002..2.433 rows=1,650 loops=5)

44. 0.673 1.482 ↑ 1.0 1,650 5 / 5

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 119kB
45. 0.809 0.809 ↑ 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.809 rows=1,650 loops=5)

46. 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: 1,024 Batches: 1 Memory Usage: 9kB
47. 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.006..0.009 rows=6 loops=5)

48. 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)
49. 0.368 0.699 ↑ 1.0 945 5 / 5

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 68kB
50. 0.331 0.331 ↑ 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.331 rows=945 loops=5)

51. 0.001 0.005 ↓ 0.0 0 5 / 5

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
52. 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)

53. 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: 1,024 Batches: 1 Memory Usage: 8kB
54. 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)

55.          

SubPlan (for Gather)

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

57. 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.735 ms
Execution time : 389.588 ms