explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2IYj

Settings
# exclusive inclusive rows x rows loops node
1. 3.165 31.674 ↑ 1.1 1,271 1

Nested Loop Left Join (cost=1,498.45..92,123.78 rows=1,417 width=1,826) (actual time=9.231..31.674 rows=1,271 loops=1)

2. 3.350 25.967 ↑ 1.1 1,271 1

Gather (cost=1,498.18..80,128.86 rows=1,417 width=1,625) (actual time=9.212..25.967 rows=1,271 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
3. 0.316 22.617 ↑ 1.4 318 4 / 4

Hash Left Join (cost=498.18..78,987.16 rows=457 width=1,625) (actual time=3.129..22.617 rows=318 loops=4)

  • Hash Cond: (ps_eps.earlypaymentmapping_id = bpt.mapping_id)
4. 0.308 22.298 ↑ 1.4 318 4 / 4

Hash Left Join (cost=487.95..78,975.21 rows=457 width=1,625) (actual time=3.111..22.298 rows=318 loops=4)

  • Hash Cond: (si.paymentadvice_id = ipa.id)
5. 0.312 21.986 ↑ 1.4 318 4 / 4

Hash Left Join (cost=477.73..78,963.78 rows=457 width=581) (actual time=3.095..21.986 rows=318 loops=4)

  • Hash Cond: (si.currency_id = c.id)
6. 0.589 21.662 ↑ 1.4 318 4 / 4

Nested Loop Left Join (cost=476.59..78,960.60 rows=457 width=585) (actual time=3.070..21.662 rows=318 loops=4)

7. 0.328 20.437 ↑ 1.4 318 4 / 4

Hash Left Join (cost=476.16..75,774.22 rows=457 width=585) (actual time=3.057..20.437 rows=318 loops=4)

  • Hash Cond: (si.supplier_id = s_cb.id)
8. 0.310 20.089 ↑ 1.4 318 4 / 4

Hash Left Join (cost=467.85..75,759.63 rows=457 width=575) (actual time=3.023..20.089 rows=318 loops=4)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
9. 0.327 18.153 ↑ 1.4 318 4 / 4

Hash Left Join (cost=256.73..75,547.30 rows=457 width=565) (actual time=1.383..18.153 rows=318 loops=4)

  • Hash Cond: (si.originatordivision_id = od_db.id)
10. 0.537 17.804 ↑ 1.4 318 4 / 4

Nested Loop Left Join (cost=255.41..75,544.42 rows=457 width=553) (actual time=1.347..17.804 rows=318 loops=4)

11. 0.437 16.631 ↑ 1.4 318 4 / 4

Nested Loop Left Join (cost=254.99..75,318.73 rows=457 width=437) (actual time=1.337..16.631 rows=318 loops=4)

12. 0.375 15.559 ↑ 1.4 318 4 / 4

Hash Left Join (cost=254.57..75,115.26 rows=457 width=437) (actual time=1.322..15.559 rows=318 loops=4)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
13. 0.566 15.093 ↑ 1.4 318 4 / 4

Nested Loop (cost=251.39..75,105.80 rows=457 width=427) (actual time=1.174..15.093 rows=318 loops=4)

14. 4.094 13.892 ↑ 11.0 318 4 / 4

Nested Loop (cost=250.96..73,535.68 rows=3,504 width=411) (actual time=1.164..13.892 rows=318 loops=4)

15. 2.197 3.118 ↑ 1.3 3,340 4 / 4

Parallel Bitmap Heap Scan on supplierinvoice si (cost=250.53..42,721.90 rows=4,248 width=207) (actual time=0.982..3.118 rows=3,340 loops=4)

  • Recheck Cond: (supplier_id = 6167)
  • Filter: (nettingbundle_id IS NULL)
  • Rows Removed by Filter: 12
  • Heap Blocks: exact=266
16. 0.920 0.920 ↓ 1.0 13,406 1 / 4

Bitmap Index Scan on supplierinvoice_supplier_idx (cost=0.00..247.24 rows=13,174 width=0) (actual time=3.682..3.682 rows=13,406 loops=1)

  • Index Cond: (supplier_id = 6167)
17. 6.679 6.679 ↓ 0.0 0 13,359 / 4

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement ps_eps (cost=0.43..7.25 rows=1 width=220) (actual time=0.002..0.002 rows=0 loops=13,359)

  • Index Cond: (invoice_id = si.id)
  • Filter: (creationdate >= '2019-01-01'::date)
  • Rows Removed by Filter: 1
18. 0.636 0.636 ↑ 1.0 1 1,271 / 4

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement ps_apfeps (cost=0.42..0.45 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=1,271)

  • Index Cond: (id = ps_eps.id)
19. 0.011 0.091 ↑ 1.0 20 4 / 4

Hash (cost=2.93..2.93 rows=20 width=26) (actual time=0.090..0.091 rows=20 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
20. 0.019 0.080 ↑ 1.0 20 4 / 4

Merge Right Join (cost=2.05..2.93 rows=20 width=26) (actual time=0.059..0.080 rows=20 loops=4)

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
21. 0.015 0.015 ↑ 275.0 6 4 / 4

Index Scan using corporatebase_pkey on corporatebase ps_eps_t_bc_cb (cost=0.28..234.48 rows=1,650 width=26) (actual time=0.013..0.015 rows=6 loops=4)

22. 0.032 0.046 ↑ 1.0 20 4 / 4

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.041..0.046 rows=20 loops=4)

  • Sort Key: ps_apfeps_t_apfda.bank_id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
  • Worker 2: Sort Method: quicksort Memory: 25kB
23. 0.014 0.014 ↑ 1.0 20 4 / 4

Seq Scan on apfdebtoragreement ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=16) (actual time=0.007..0.014 rows=20 loops=4)

24. 0.636 0.636 ↑ 1.0 1 1,271 / 4

Index Only Scan using financingcontextbase_pkey on financingcontextbase ps_apffc_fc_fcb (cost=0.42..0.45 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,271)

  • Index Cond: (id = ps_apfeps.financingcontext_id)
  • Heap Fetches: 0
25. 0.636 0.636 ↑ 1.0 1 1,271 / 4

Index Scan using apffinancingcontext_pkey on apffinancingcontext ps_apffc_fc_afc (cost=0.42..0.49 rows=1 width=132) (actual time=0.002..0.002 rows=1 loops=1,271)

  • Index Cond: (ps_apffc_fc_fcb.id = id)
26. 0.009 0.022 ↑ 1.0 14 4 / 4

Hash (cost=1.14..1.14 rows=14 width=28) (actual time=0.021..0.022 rows=14 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
27. 0.013 0.013 ↑ 1.0 14 4 / 4

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

28. 0.682 1.626 ↑ 1.0 1,650 4 / 4

Hash (cost=190.50..190.50 rows=1,650 width=26) (actual time=1.625..1.626 rows=1,650 loops=4)

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
29. 0.944 0.944 ↑ 1.0 1,650 4 / 4

Seq Scan on corporatebase od_c_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.004..0.944 rows=1,650 loops=4)

30. 0.003 0.020 ↑ 1.0 1 4 / 4

Hash (cost=8.29..8.29 rows=1 width=26) (actual time=0.020..0.020 rows=1 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.017 0.017 ↑ 1.0 1 4 / 4

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..8.29 rows=1 width=26) (actual time=0.016..0.017 rows=1 loops=4)

  • Index Cond: (id = 6167)
32. 0.636 0.636 ↑ 1.0 1 1,271 / 4

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..6.97 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=1,271)

  • Index Cond: (si.importbatch_id = id)
33. 0.004 0.012 ↑ 1.0 6 4 / 4

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

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

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

35. 0.001 0.004 ↓ 0.0 0 4 / 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
36. 0.003 0.003 ↓ 0.0 0 4 / 4

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

37. 0.000 0.003 ↓ 0.0 0 4 / 4

Hash (cost=10.10..10.10 rows=10 width=16) (actual time=0.003..0.003 rows=0 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
38. 0.003 0.003 ↓ 0.0 0 4 / 4

Seq Scan on bankpaymenttransaction bpt (cost=0.00..10.10 rows=10 width=16) (actual time=0.003..0.003 rows=0 loops=4)

39. 1.271 1.271 ↓ 0.0 0 1,271

Index Scan using earlypaymentadvice_pkey on earlypaymentadvice eps_epa (cost=0.28..0.29 rows=1 width=30) (actual time=0.001..0.001 rows=0 loops=1,271)

  • Index Cond: (id = ps_eps.earlypaymentadvice_id)
40.          

SubPlan (for Nested Loop Left Join)

41. 1.271 1.271 ↑ 1.0 1 1,271

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

42. 0.000 0.000 ↓ 0.0 0 1,271

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt_1 (cost=0.14..8.15 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=1,271)

  • Index Cond: (mapping_id = ps_eps.maturitypaymentmapping_id)
Planning time : 8.289 ms
Execution time : 32.898 ms