[venus-market] opt slow sql / 慢查询优化 #5645
Labels
C-enhancement
Category: feature enhancement
P2
Medium - we should get to this soon
V-venus-market
venus-market component
Milestone
链服务模块 / Chain Service Components
订单服务模块 / Deal Service Components
算力服务模块 / Storage Power Service Components
描述 / Description
SELECT * FROM
storage_deals
WHERE cdp_provider = '0522948' AND state IN (7)当该表数据较多时该sql执行比较耗时(参考:扫描1k行需要3~10秒),建议添加个联合索引:
ALTER TABLE
venus_market
.storage_deals
ADD INDEXidx_cdpprovider_state
(cdp_provider
,state
)The text was updated successfully, but these errors were encountered: