sql对100万条数据的查询和统计(主要是统计)效率提升

2024-12-04 19:42:52
推荐回答(1个)
回答(1):

SELECT count(id)
FROM TBL_POS_SHOP s,
TBL_POS_POS p,
TBL_POS_CUSTOMER c,
TBL_POS_ORDER o,
TBL_POS_CARDINFO cd
WHERE o.POS_CATI = p.POS_CATI
and o.CUSTOMER_ID = c.ID
and o.SHOP_ID = s.ID
and o.CARDINFO_ID = cd.ID