explain.depesz.com

PostgreSQL's explain analyze made readable

Result: THZL

Settings
# exclusive inclusive rows x rows loops node
1. 2.191 657.674 ↑ 1.1 1,272 1

Hash Left Join (cost=1,292.16..92,333.49 rows=1,417 width=1,810) (actual time=31.373..657.674 rows=1,272 loops=1)

  • Hash Cond: (ps_eps.earlypaymentmapping_id = bpt.mapping_id)
2. 1.073 654.207 ↑ 1.1 1,272 1

Nested Loop Left Join (cost=1,281.94..80,737.51 rows=1,417 width=1,655) (actual time=31.341..654.207 rows=1,272 loops=1)

3. 5.717 649.318 ↑ 1.1 1,272 1

Nested Loop Left Join (cost=1,281.66..80,323.02 rows=1,417 width=1,641) (actual time=31.328..649.318 rows=1,272 loops=1)

  • Join Filter: (si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 16536
4. 0.000 639.785 ↑ 1.1 1,272 1

Gather (cost=1,281.38..79,936.13 rows=1,417 width=1,619) (actual time=31.298..639.785 rows=1,272 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
5. 0.312 645.468 ↑ 1.4 318 4 / 4

Hash Left Join (cost=281.38..78,794.43 rows=457 width=1,619) (actual time=25.328..645.468 rows=318 loops=4)

  • Hash Cond: (si.paymentadvice_id = ipa.id)
6. 0.314 645.151 ↑ 1.4 318 4 / 4

Hash Left Join (cost=271.16..78,783.01 rows=457 width=575) (actual time=25.306..645.151 rows=318 loops=4)

  • Hash Cond: (si.currency_id = c.id)
7. 0.606 644.820 ↑ 1.4 318 4 / 4

Nested Loop Left Join (cost=270.02..78,779.83 rows=457 width=579) (actual time=25.272..644.820 rows=318 loops=4)

8. 0.314 634.674 ↑ 1.4 318 4 / 4

Hash Left Join (cost=269.59..75,593.52 rows=457 width=579) (actual time=24.348..634.674 rows=318 loops=4)

  • Hash Cond: (si.supplier_id = s_cb.id)
9. 0.429 634.328 ↑ 1.4 318 4 / 4

Nested Loop Left Join (cost=261.28..75,578.92 rows=457 width=569) (actual time=24.298..634.328 rows=318 loops=4)

10. 0.376 633.263 ↑ 1.4 318 4 / 4

Nested Loop Left Join (cost=260.86..75,353.23 rows=457 width=453) (actual time=24.284..633.263 rows=318 loops=4)

11. 0.300 630.979 ↑ 1.4 318 4 / 4

Hash Left Join (cost=260.44..75,136.26 rows=457 width=437) (actual time=24.268..630.979 rows=318 loops=4)

  • Hash Cond: (si.nettingbundle_id = nb.id)
  • Filter: ((si.nettingbundle_id IS NULL) OR (si.id = nb.surplus_id))
12. 0.384 630.532 ↑ 1.4 318 4 / 4

Hash Join (cost=254.57..75,129.19 rows=457 width=445) (actual time=24.096..630.532 rows=318 loops=4)

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

Nested Loop (cost=251.39..75,119.72 rows=457 width=435) (actual time=23.932..630.049 rows=318 loops=4)

14. 1.608 625.295 ↑ 11.0 318 4 / 4

Nested Loop (cost=250.96..73,549.15 rows=3,505 width=419) (actual time=23.904..625.295 rows=318 loops=4)

15. 22.211 23.768 ↑ 1.3 3,352 4 / 4

Parallel Bitmap Heap Scan on supplierinvoice si (cost=250.53..42,721.90 rows=4,250 width=207) (actual time=3.567..23.768 rows=3,352 loops=4)

  • Recheck Cond: (supplier_id = 6167)
  • Heap Blocks: exact=252
16. 1.557 1.557 ↓ 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=6.228..6.228 rows=13,406 loops=1)

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

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

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

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

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

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

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

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

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
21. 0.016 0.016 ↑ 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.016 rows=6 loops=4)

22. 0.033 0.049 ↑ 1.0 20 4 / 4

Sort (cost=1.63..1.68 rows=20 width=16) (actual time=0.042..0.049 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.016 0.016 ↑ 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.009..0.016 rows=20 loops=4)

24. 0.074 0.147 ↑ 1.0 172 4 / 4

Hash (cost=3.72..3.72 rows=172 width=16) (actual time=0.147..0.147 rows=172 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
25. 0.073 0.073 ↑ 1.0 172 4 / 4

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

26. 1.908 1.908 ↑ 1.0 1 1,272 / 4

Index Scan using financingcontextbase_pkey on financingcontextbase ps_apffc_fc_fcb (cost=0.42..0.47 rows=1 width=24) (actual time=0.006..0.006 rows=1 loops=1,272)

  • Index Cond: (id = ps_apfeps.financingcontext_id)
27. 0.636 0.636 ↑ 1.0 1 1,272 / 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,272)

  • Index Cond: (ps_apffc_fc_fcb.id = id)
28. 0.005 0.032 ↑ 1.0 1 4 / 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
29. 0.027 0.027 ↑ 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.026..0.027 rows=1 loops=4)

  • Index Cond: (id = 6167)
30. 9.540 9.540 ↑ 1.0 1 1,272 / 4

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

  • Index Cond: (si.importbatch_id = id)
31. 0.006 0.017 ↑ 1.0 6 4 / 4

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

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

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

33. 0.001 0.005 ↓ 0.0 0 4 / 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
34. 0.004 0.004 ↓ 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.004 rows=0 loops=4)

35. 3.741 3.816 ↑ 1.0 14 1,272

Materialize (cost=0.28..89.35 rows=14 width=38) (actual time=0.000..0.003 rows=14 loops=1,272)

36. 0.025 0.075 ↑ 1.0 14 1

Nested Loop Left Join (cost=0.28..89.28 rows=14 width=38) (actual time=0.014..0.075 rows=14 loops=1)

37. 0.008 0.008 ↑ 1.0 14 1

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

38. 0.042 0.042 ↑ 1.0 1 14

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

  • Index Cond: (id = od_db.buyer_id)
39. 3.816 3.816 ↓ 0.0 0 1,272

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

  • Index Cond: (id = ps_eps.earlypaymentadvice_id)
40. 0.001 0.004 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
41. 0.003 0.003 ↓ 0.0 0 1

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

42.          

SubPlan (for Hash Left Join)

43. 1.272 1.272 ↑ 1.0 1 1,272

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

44. 0.000 0.000 ↓ 0.0 0 1,272

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,272)

  • Index Cond: (mapping_id = ps_eps.maturitypaymentmapping_id)
Planning time : 8.263 ms
Execution time : 659.304 ms