explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RW3o

Settings
# exclusive inclusive rows x rows loops node
1. 3.169 236.812 ↓ 911.0 911 1

Planning Time: 13.121 msNested Loop Left Join (cost=15,624.73..16,474.07 rows=1 width=1,810) (actual time=211.632..236.812 rows=911 loops=1)

2. 233.643 233.643 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,624.59..16,465.74 rows=1 width=1,655) (actual time=211.605..233.643 rows=911 loops=1)

3. 0.000 0.000 ↓ 0.0 0 911

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

4. 0.000 0.911 ↑ 1.0 1 911

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

  • Index Cond: (mapping_id = fi_eps.earlypaymentmapping_id)
5. 232.355 232.355 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,624.46..16,465.57 rows=1 width=611) (actual time=211.594..232.355 rows=911 loops=1)

6. 0.000 0.000 ↓ 0.0 0 911

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

7. 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: (fi_si.paymentadvice_id = id)
8. 229.963 229.963 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,624.18..16,465.28 rows=1 width=597) (actual time=211.580..229.963 rows=911 loops=1)

9. 0.000 0.911 ↑ 1.0 1 911

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

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
  • Index Cond: (id = fi_eps.earlypaymentadvice_id)
10. 227.044 227.044 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,623.75..16,464.78 rows=1 width=597) (actual time=211.564..227.044 rows=911 loops=1)

11. 0.000 1.822 ↑ 1.0 1 911

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)
12. 224.967 224.967 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,623.62..16,464.62 rows=1 width=601) (actual time=211.549..224.967 rows=911 loops=1)

13. 0.000 0.911 ↑ 1.0 1 911

Index Scan using crxcurrency_pkey on crxcurrency c (cost=0.13..0.15 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=911)

  • Index Cond: (si.currency_id = id)
14. 222.563 222.563 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,623.34..16,464.33 rows=1 width=591) (actual time=211.535..222.563 rows=911 loops=1)

15. 0.000 0.911 ↑ 1.0 1 911

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

  • Index Cond: (id = si.supplier_id)
16. 220.089 220.089 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,623.06..16,458.03 rows=1 width=581) (actual time=211.520..220.089 rows=911 loops=1)

17. 0.000 0.911 ↑ 1.0 1 911

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

  • Index Cond: (id = od_db.buyer_id)
18. 217.140 217.140 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,622.64..16,457.56 rows=1 width=465) (actual time=211.505..217.140 rows=911 loops=1)

19. 0.000 1.822 ↑ 1.0 1 911

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

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
20. 215.933 215.933 ↓ 911.0 911 1

Nested Loop Left Join (cost=15,622.36..16,452.06 rows=1 width=455) (actual time=211.491..215.933 rows=911 loops=1)

21. 0.000 0.000 ↓ 0.0 0 911

Index Scan using corporatebase_pkey on corporatebase ps_eps_t_bc_cb (cost=0.28..5.49 rows=1 width=26) (actual time=0.000..0.000 rows=0 loops=911)

  • Index Cond: (id = ps_apfeps_t_apfda.bank_id)
22. 0.000 0.000 ↓ 0.0 0 911

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

23. 12.213 220.066 ↓ 911.0 911 1

Gather (cost=15,621.94..16,451.59 rows=1 width=447) (actual time=211.480..220.066 rows=911 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
  • Index Cond: (id = ps_apfeps.financingcontext_id)
24. 0.189 207.853 ↓ 182.0 182 5 / 5

Hash Left Join (cost=14,621.94..15,451.49 rows=1 width=447) (actual time=204.615..207.853 rows=182 loops=5)

  • Rows Removed by Filter: 10
  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
  • Filter: ((ps_apfeps_t_apfda.buyer_id = 3053) OR (ps_apfeps_t_apfda.id IS NULL))
25. 207.639 207.639 ↑ 211.4 192 5 / 5

Parallel Hash Left Join (cost=14,620.49..15,315.85 rows=40,588 width=447) (actual time=204.565..207.639 rows=192 loops=5)

26. 0.000 0.025 ↑ 1.0 20 5 / 5

Hash (cost=1.20..1.20 rows=20 width=24) (actual time=0.025..0.025 rows=20 loops=5)

  • Hash Cond: (ps_eps.id = ps_apfeps.id)
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
27. 0.011 0.011 ↑ 1.0 20 5 / 5

Seq Scan on apfdebtoragreement ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=24) (actual time=0.004..0.011 rows=20 loops=5)

28. 198.721 198.721 ↑ 2.1 166,262 5 / 5

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

29. 0.000 6.414 ↑ 211.4 192 5 / 5

Merge Join (cost=1,531.96..2,120.78 rows=40,588 width=431) (actual time=3.888..6.414 rows=192 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
  • Buckets: 1048576 Batches: 1 Memory Usage: 53792kB
30. 2.650 2.650 ↓ 42.0 210 5 / 5

Sort (cost=1,531.10..1,531.11 rows=5 width=68) (actual time=2.584..2.650 rows=210 loops=5)

31. 76.551 76.551 ↑ 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.008..76.551 rows=166,262 loops=5)

32. 0.000 3.406 ↑ 2,654.4 526 5 / 5

Nested Loop Left Join (cost=0.86..1,806,733.22 rows=1,396,223 width=371) (actual time=0.063..3.406 rows=526 loops=5)

  • Worker 3: Sort Method: quicksort Memory: 32kB
  • Worker 2: Sort Method: quicksort Memory: 32kB
  • Worker 1: Sort Method: quicksort Memory: 32kB
  • Worker 0: Sort Method: quicksort Memory: 32kB
  • Sort Method: quicksort Memory: 32kB
  • Sort Key: nb.id
  • Filter: ((ps_eps.creationdate >= '2019-01-01'::date) OR (ps_eps.id IS NULL))
33. 0.961 0.961 ↑ 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.041..0.961 rows=526 loops=5)

34. 2.514 2.514 ↓ 10.2 51 5 / 5

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

35. 0.000 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=200) (actual time=0.002..0.002 rows=0 loops=2,629)

  • Rows Removed by Join Filter: 322
  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Index Cond: (si.id = invoice_id)
36. 2.207 2.207 ↓ 10.2 51 5 / 5

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

37. 0.000 0.153 ↑ 2.0 7 255 / 5

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

38. 0.015 0.015 ↑ 1.0 14 5 / 5

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

39. 1.978 1.978 ↓ 10.2 51 5 / 5

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

40. 0.000 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)

  • Rows Removed by Join Filter: 691
  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Index Cond: (id = fi_eps.invoice_id)
41. 1.348 1.348 ↓ 9.1 172 5 / 5

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

42. 0.000 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)

43. 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.006..0.010 rows=5 loops=5)

44. 0.743 0.743 ↓ 1.2 172 5 / 5

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

45. 0.000 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)

  • Rows Removed by Filter: 15
  • Index Cond: (id = fi_eps.id)
  • Filter: (bank_id = 3053)
46. 0.072 0.072 ↑ 1.0 172 5 / 5

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

47. 0.516 0.516 ↑ 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.003..0.003 rows=1 loops=860)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
Execution time : 243.328 ms