程序中的sql如以下:
select t3.*,t1.costPrice as costP,t1.retailPrice as retailP,t1.basicPricing as basicP from goodsGroupCopy t1 left join groupCopyGoods t2 on t1.id = t2.goodsGroupCopyId left join goods t3 on t3.id = t2.goodsId where 1=1 and t1.salesPlatformId = 1 and t1.state is null and t1.salesStatus = 1 and t2.mainGoods = 1 and t3.prescriptionType=1
添加一个时间区间查询就很快但数据量是非常少的,不加入最多3,4千条就卡了停顿很长很长时间啊。