explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wA59

Settings
# exclusive inclusive rows x rows loops node
1. 7.786 400.748 ↓ 18.1 4,756 1

Nested Loop Left Join (cost=6,204.71..20,679.80 rows=263 width=1,095) (actual time=163.584..400.748 rows=4,756 loops=1)

  • Buffers: shared hit=151223 read=923
2. 9.184 283.574 ↓ 18.1 4,756 1

WindowAgg (cost=6,204.15..11,832.48 rows=263 width=701) (actual time=163.517..283.574 rows=4,756 loops=1)

  • Buffers: shared hit=83068 read=301
3. 15.255 179.270 ↓ 18.1 4,756 1

GroupAggregate (cost=6,204.15..6,232.42 rows=263 width=573) (actual time=163.451..179.270 rows=4,756 loops=1)

  • Group Key: t1.ensh_sal_no, t2.prd_cd
  • Buffers: shared hit=39741 read=301
4. 13.326 164.015 ↓ 18.7 4,915 1

Sort (cost=6,204.15..6,204.80 rows=263 width=99) (actual time=163.428..164.015 rows=4,915 loops=1)

  • Sort Key: t1.ensh_sal_no, t2.prd_cd
  • Sort Method: quicksort Memory: 884kB
  • Buffers: shared hit=39741 read=301
5. 2.286 150.689 ↓ 18.7 4,915 1

Nested Loop Left Join (cost=7.84..6,193.58 rows=263 width=99) (actual time=2.738..150.689 rows=4,915 loops=1)

  • Buffers: shared hit=39741 read=301
6. 0.931 39.015 ↓ 18.1 4,756 1

Nested Loop (cost=7.28..6,012.55 rows=263 width=93) (actual time=2.282..39.015 rows=4,756 loops=1)

  • Buffers: shared hit=16202 read=16
7. 1.334 3.555 ↓ 18.6 3,139 1

Bitmap Heap Scan on lsslcm_sal_rtn t1 (cost=6.71..673.17 rows=169 width=54) (actual time=2.261..3.555 rows=3,139 loops=1)

  • Recheck Cond: (((sal_prtn_id)::text = '11000829'::text) AND ((sal_rtn_dt)::text >= '20190428'::text) AND ((sal_rtn_dt)::text <= '20190628'::text))
  • Filter: ((ch_cd)::text = '004'::text)
  • Heap Blocks: exact=437
  • Buffers: shared hit=442 read=16
8. 2.221 2.221 ↓ 18.6 3,139 1

Bitmap Index Scan on lsslcm_sal_rtn_ux01 (cost=0.00..6.67 rows=169 width=0) (actual time=2.221..2.221 rows=3,139 loops=1)

  • Index Cond: (((sal_prtn_id)::text = '11000829'::text) AND ((sal_rtn_dt)::text >= '20190428'::text) AND ((sal_rtn_dt)::text <= '20190628'::text))
  • Buffers: shared hit=5 read=16
9. 34.529 34.529 ↑ 7.0 2 3,139

Index Scan using xpk_lsslsd_sal_prd on lsslcd_sal_prd t2 (cost=0.56..31.45 rows=14 width=39) (actual time=0.010..0.011 rows=2 loops=3,139)

  • Index Cond: ((ensh_sal_no)::text = (t1.ensh_sal_no)::text)
  • Buffers: shared hit=15760
10. 109.388 109.388 ↑ 1.0 1 4,756

Index Scan using xpk_lsslcd_sal_bnft on lsslcd_sal_bnft t9 (cost=0.56..0.68 rows=1 width=38) (actual time=0.020..0.023 rows=1 loops=4,756)

  • Index Cond: (((ensh_sal_no)::text = (t2.ensh_sal_no)::text) AND ((prd_cd)::text = (t2.prd_cd)::text))
  • Buffers: shared hit=23539 read=285
11.          

SubPlan (forWindowAgg)

12. 4.756 71.340 ↓ 0.0 0 4,756

Limit (cost=8.86..12.82 rows=1 width=4) (actual time=0.015..0.015 rows=0 loops=4,756)

  • Buffers: shared hit=28961
13. 0.000 66.584 ↓ 0.0 0 4,756

Bitmap Heap Scan on lsslcd_sal_rtn_rl t0_1 (cost=8.86..16.78 rows=2 width=4) (actual time=0.014..0.014 rows=0 loops=4,756)

  • Recheck Cond: (((t1.ensh_sal_no)::text = (orn_ensh_sal_no)::text) OR ((t1.ensh_sal_no)::text = (rtn_ensh_sal_no)::text))
  • Heap Blocks: exact=337
  • Buffers: shared hit=28961
14. 0.000 66.584 ↓ 0.0 0 4,756

BitmapOr (cost=8.86..8.86 rows=2 width=0) (actual time=0.014..0.014 rows=0 loops=4,756)

  • Buffers: shared hit=28624
15. 33.292 33.292 ↓ 0.0 0 4,756

Bitmap Index Scan on lsslcd_sal_rtn_rl_pk (cost=0.00..4.43 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=4,756)

  • Index Cond: ((t1.ensh_sal_no)::text = (orn_ensh_sal_no)::text)
  • Buffers: shared hit=14356
16. 33.292 33.292 ↓ 0.0 0 4,756

Bitmap Index Scan on lsslcd_sal_rtn_rl_ix01 (cost=0.00..4.43 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=4,756)

  • Index Cond: ((t1.ensh_sal_no)::text = (rtn_ensh_sal_no)::text)
  • Buffers: shared hit=14268
17. 0.000 23.780 ↓ 0.0 0 4,756

Limit (cost=0.42..8.45 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=4,756)

  • Buffers: shared hit=14366
18. 23.780 23.780 ↓ 0.0 0 4,756

Index Scan using lsslsm_mvp_join_cust_ix01 on lsslsm_mvp_cust t0_2 (cost=0.42..8.45 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=4,756)

  • Index Cond: (((join_ensh_sal_no)::text = (t1.ensh_sal_no)::text) AND ((mvp_join_prd_cd)::text = (t2.prd_cd)::text))
  • Filter: ((join_cust_grd_tp_cd)::text = '01'::text)
  • Buffers: shared hit=14366
19. 23.780 23.780 ↑ 1.0 1 4,756

Index Scan using xpk_cicuem_cu_inf on cicuem_cu_inf t02 (cost=0.56..8.58 rows=1 width=19) (actual time=0.005..0.005 rows=1 loops=4,756)

  • Index Cond: ((max(t1.incs_no)) = incs_no)
  • Buffers: shared hit=20541 read=622
20.          

SubPlan (forNested Loop Left Join)

21. 28.536 28.536 ↑ 1.0 1 4,756

Index Scan using xpk_sccdem_partner on sccdem_partner t5 (cost=0.28..8.30 rows=1 width=27) (actual time=0.005..0.006 rows=1 loops=4,756)

  • Index Cond: ((prtn_id)::text = (max((t1.sal_prtn_id)::text)))
  • Buffers: shared hit=14268
22. 23.780 23.780 ↑ 1.0 1 4,756

Index Scan using xpk_sccdem_prtn_emp on lspasm_prtn_emp t6 (cost=0.29..8.30 rows=1 width=9) (actual time=0.005..0.005 rows=1 loops=4,756)

  • Index Cond: ((prtn_emp_id)::text = (max((t1.sal_prtn_emp_id)::text)))
  • Buffers: shared hit=14268
23. 33.292 33.292 ↑ 1.0 1 4,756

Index Scan using xpk_sccdem_product on sccdem_product t0 (cost=0.42..8.44 rows=1 width=47) (actual time=0.007..0.007 rows=1 loops=4,756)

  • Index Cond: ((prd_cd)::text = (t2.prd_cd)::text)
  • Buffers: shared hit=19078
Planning time : 1.734 ms
Execution time : 401.322 ms