select m.name as name,
mc.mc_sort,
sh.sh_org_id as orgid,
sum(sl.sl_ship_qty) as shipqty,
0 as receiptqty,
0 as quantqty
from wm_ship_header sh
join wm_ship_line sl
on sh.billid = sl.billid
join CP_VENDOR_CUSTOMER vc
on sh.sh_customer_id = vc.id
join cp_material m
on m.id = sl.sl_material_id
join CP_MATERIAL_CATEGORY mc
on mc.id = m.MAT_CATEGORY_ID
where 1 = 1
and mc.is_count = 1
and (sl.sl_lot_mstdata0 = 84345823 or
sl.sl_lot_mstdata0 = 228292)
and to_char(sh.makedate, 'yyyy-mm-dd') =to_char(sysdate, 'yyyy-mm-dd')
group by m.name, mc.mc_sort, sh.sh_org_id
2023-05-22
oralce的sql查询语句where后面加了一个字段的条件,造成查询数据慢了十几倍
我来答
添加附件
收藏
分享
问题补充
1条回答
默认
最新
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏