1963350
语句如下,其中shop_id建立了索引,扫描行数712127行:
select
id,
material_id,
cnt,
stock_cnt,
status,
type,
gmt_deadline,
sale_type,
gmt_gen
from
stock_count t
where
t.shop_id = '330547'
and t.brand_id = '100148'
and t.status in (0, 2)
and t.is_init = 0
and t.type in (2, 1, 3)
and t.sale_type in (0, 1)
order by
id desc
LIMIT
0, 1