重现步骤
反馈人:李冠
严重级别:严重
所属项目:walmart
问题原因:超慢SQL问题,执行300秒+,(大表)大量回表,SQL为(SELECT
id,source_id,source_name,sku,source_sku,item_id,feed_id
FROM t_walmart_execute_queue

WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500)
解决方案:先查ID,再JOIN查询数据,避免大量回表,优化后SQL为(从几百秒下降到毫秒级):(SELECT
t.id,t.source_id,t.source_name,t.sku,t.source_sku,t.item_id,t.feed_id from t_walmart_execute_queue t join (select id
FROM t_walmart_execute_queue

WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500) tt on t.id=tt.id)
历史记录  
  1. 2025-06-26 17:51:15, 由 陈莉珍 创建。
  2. 2025-06-26 17:52:54, 由 刘瀚泽 指派给 任芳涛。
    修改了 指派给,旧值为 "liuhanze",新值为 "renfangtao"。
  3. 2025-06-26 18:00:28, 由 任芳涛 指派给 梁欢。
    修改了 指派给,旧值为 "renfangtao",新值为 "lianghuan"。
  4. 2025-06-26 18:03:18, 由 梁欢 解决,方案为 性能问题 。
    修改了 解决方案,旧值为 "",新值为 "performance"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2025-06-26 18:01:14"。
    修改了 指派给 ,旧值为 "lianghuan",新值为 "chenlizhen"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "lianghuan"。

    原因:查询的字段不在索引中未命中索引,故性能差,

    解决方案 :已经按照建议方案方向做调整

  5. 2025-06-27 08:57:25, 由 陈莉珍 编辑。
    修改了 所属模块 ,旧值为 "0",新值为 "1872"。
    修改了 业务部门 ,旧值为 "0",新值为 "2"。
    修改了 测试责任人,旧值为 "",新值为 "lianghuan"。
    修改了 解决时效 ,旧值为 "0",新值为 "0.17"。
    修改了 重现步骤 ,区别为:
    001- 反馈人:李冠
    001+ 反馈人:李冠 严重级别:严重 所属项目:walmart 问题原因:超慢SQL问题,执行300秒+,(大表)大量回表,SQL为(SELECT id,source_id,source_name,sku,source_sku,item_id,feed_id FROM t_walmart_execute_queue WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500) 解决方案:先查ID,再JOIN查询数据,避免大量回表,优化后SQL为(从几百秒下降到毫秒级):(SELECT t.id,t.source_id,t.source_name,t.sku,t.source_sku,t.item_id,t.feed_id from t_walmart_execute_queue t join (select id FROM t_walmart_execute_queue WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500) tt on t.id=tt.id)
    002- 严重级别:严重
    003- 所属项目:walmart
    004- 问题原因:超慢SQL问题,执行300秒+,(大表)大量回表,SQL为(SELECT
    005- id,source_id,source_name,sku,source_sku,item_id,feed_id
    006- FROM t_walmart_execute_queue
    007-
    008- WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500)
    009- 解决方案:先查ID,再JOIN查询数据,避免大量回表,优化后SQL为(从几百秒下降到毫秒级):(SELECT
    010- t.id,t.source_id,t.source_name,t.sku,t.source_sku,t.item_id,t.feed_id from t_walmart_execute_queue t join (select id
    011- FROM t_walmart_execute_queue
    012-
    013- WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500) tt on t.id=tt.id)
    001- 反馈人:李冠<br />
    001+ 反馈人:李冠<br /> 严重级别:严重<br /> 所属项目:walmart<br /> 问题原因:超慢SQL问题,执行300秒+,(大表)大量回表,SQL为(SELECT <br /> id,source_id,source_name,sku,source_sku,item_id,feed_id<br /> FROM t_walmart_execute_queue <br /><br /> WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500)<br /> 解决方案:先查ID,再JOIN查询数据,避免大量回表,优化后SQL为(从几百秒下降到毫秒级):(SELECT <br /> t.id,t.source_id,t.source_name,t.sku,t.source_sku,t.item_id,t.feed_id from t_walmart_execute_queue t join (select id <br /> FROM t_walmart_execute_queue <br /><br /> WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500) tt on t.id=tt.id)
    002- 严重级别:严重<br />
    003- 所属项目:walmart<br />
    004- 问题原因:超慢SQL问题,执行300秒+,(大表)大量回表,SQL为(SELECT <br />
    005- id,source_id,source_name,sku,source_sku,item_id,feed_id<br />
    006- FROM t_walmart_execute_queue <br />
    007- <br />
    008- WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500)<br />
    009- 解决方案:先查ID,再JOIN查询数据,避免大量回表,优化后SQL为(从几百秒下降到毫秒级):(SELECT <br />
    010- t.id,t.source_id,t.source_name,t.sku,t.source_sku,t.item_id,t.feed_id from t_walmart_execute_queue t join (select id <br />
    011- FROM t_walmart_execute_queue <br />
    012- <br />
    013- WHERE (source_id = 20343 AND strategy_type = 9 AND business_status = 0 AND business_status = 0 AND is_deleted = 0) ORDER BY id ASC limit 500) tt on t.id=tt.id)
  6. 2025-06-27 08:57:29, 由 陈莉珍 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "chenlizhen",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "chenlizhen"。
    修改了 关闭日期,旧值为 "",新值为 "2025-06-27 08:57:29"。
所属项目 技术中心-需求池
所属模块 多平台   walmart
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P2
Bug状态 已关闭
业务部门 总经办
影响功能
开发责任人 梁欢
测试责任人 梁欢
解决时效 0.17
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2025-06-27 08:57:29
截止日期 0000-00-00
上线时间 2025-06-26 18:05:00
上线时效 0.23
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 陈莉珍 于 2025-06-26 17:51:15
影响环境 生产环境-业务反馈
由谁解决 梁欢 于 2025-06-26 18:01:14
解决版本 主干
解决方案 性能问题
由谁关闭 陈莉珍 于 2025-06-27 08:57:29
最后修改 陈莉珍 于 2025-06-27 08:57:29
相关Bug