重现步骤
反馈人:袁慧斌
数据库:zhcxkj_center_strategy_comprehensive
查询时间:31.5849
执行次数: 40
扫描行数:923209
发送行数:1000
指纹SQL: SELECT id , retry_status , source_id , country_code FROM ? WHERE ( id > ? AND source_id = ? AND status = ? AND create_time <= ? ) limit ? ;
真实SQL:SELECT id,retry_status,source_id,country_code FROM t_strategy_execute_queue_offline_fruugo WHERE (id > 726341 AND source_id = 27739 AND status = 5 AND create_time <= 2025-11-01 00:00:00) limit 1000;
无人工修改
AISQL修改建议:CREATE INDEX idx_optimized ON t_strategy_execute_queue_offline_fruugo (source_id, status, create_time, id);
explain表:






id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t_strategy_execute_queue_offline_fruugo None range PRIMARY,idx_source_id,idx_source_id_status,idx_create_time_status PRIMARY 8 None 3961123 0.57 Using where

额外建议:
索引建议:
取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【96730】 条,没有必要为该字段创建索引。

取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【80375】 条,没有必要为该字段创建索引。

建议添加索引:ALTER TABLE t_strategy_execute_queue_offline_fruugo ADD INDEX idx_id_create_time(id,create_time);


【t_strategy_execute_queue_offline_fruugo】表 【id,create_time】字段,索引分析:
+--------------------------------+------------------------+---------------+---------------+
| TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
+================================+========================+===============+===============+
| t_strategy_execute_queue_offli | idx_create_time_status | create_time | 498223 |
| ne_fruugo | | | |
+--------------------------------+------------------------+---------------+---------------+
| t_strategy_execute_queue_offli | PRIMARY | id | 7746905 |
| ne_fruugo | | | |
+--------------------------------+------------------------+---------------+---------------+


历史记录  
  1. 2025-11-05 11:04:28, 由 陈莉珍 创建。
  2. 2025-11-06 19:10:53, 由 蔡俊伟 解决,方案为 性能问题 。
    修改了 解决方案,旧值为 "",新值为 "performance"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2025-11-06 19:10:44"。
    修改了 指派给 ,旧值为 "caijunwei",新值为 "chenlizhen"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "caijunwei"。

    已解决

  3. 2025-11-07 14:55:42, 由 陈莉珍 编辑。
    修改了 所属模块 ,旧值为 "0",新值为 "1953"。
    修改了 业务部门 ,旧值为 "0",新值为 "2"。
    修改了 测试责任人,旧值为 "",新值为 "caijunwei"。
    修改了 解决时效 ,旧值为 "0",新值为 "32.10"。
    修改了 重现步骤 ,区别为:
    001- 反馈人:袁慧斌
    001+ 反馈人:袁慧斌 数据库:zhcxkj_center_strategy_comprehensive 查询时间:31.5849 执行次数: 40 扫描行数:923209 发送行数:1000 指纹SQL: SELECT id , retry_status , source_id , country_code FROM ? WHERE ( id &gt; ? AND source_id = ? AND status = ? AND create_time &lt;= ? ) limit ? ; 真实SQL:SELECT id,retry_status,source_id,country_code FROM t_strategy_execute_queue_offline_fruugo WHERE (id &gt; 726341 AND source_id = 27739 AND status = 5 AND create_time &lt;= 2025-11-01 00:00:00) limit 1000; 无人工修改 AISQL修改建议:CREATE INDEX idx_optimized ON t_strategy_execute_queue_offline_fruugo (source_id, status, create_time, id); explain表:id
    002- 数据库:zhcxkj_center_strategy_comprehensive
    002+ select_type
    003- 查询时间:31.5849
    003+ table
    004- 执行次数: 40
    004+ partitions
    005- 扫描行数:923209
    005+ type
    006- 发送行数:1000
    006+ possible_keys
    007- 指纹SQL: SELECT id , retry_status , source_id , country_code FROM ? WHERE ( id &gt; ? AND source_id = ? AND status = ? AND create_time &lt;= ? ) limit ? ;
    007+ key
    008- 真实SQL:SELECT id,retry_status,source_id,country_code FROM t_strategy_execute_queue_offline_fruugo WHERE (id &gt; 726341 AND source_id = 27739 AND status = 5 AND create_time &lt;= 2025-11-01 00:00:00) limit 1000;
    008+ key_len
    009- 无人工修改
    009+ ref
    010- AISQL修改建议:CREATE INDEX idx_optimized ON t_strategy_execute_queue_offline_fruugo (source_id, status, create_time, id);
    010+ rows
    011- explain表:
    011+ filtered
    012-
    012+ Extra
    013-
    013+ 1
    014-
    014+ SIMPLE
    015-
    015+ t_strategy_execute_queue_offline_fruugo
    016-
    016+ None
    017-
    017+ range
    018-
    018+ PRIMARY,idx_source_id,idx_source_id_status,idx_create_time_status
    019-
    019+ PRIMARY
    020-
    020+ 8
    021-
    021+ None
    022- id
    022+ 3961123
    023-
    023+ 0.57
    024-
    024+ Using where
    025- select_type
    025+
    026-
    026+ 额外建议: 索引建议: 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【96730】 条,没有必要为该字段创建索引。 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【80375】 条,没有必要为该字段创建索引。 建议添加索引:ALTER TABLE t_strategy_execute_queue_offline_fruugo ADD INDEX idx_id_create_time(id,create_time); 【t_strategy_execute_queue_offline_fruugo】表 【id,create_time】字段,索引分析: +--------------------------------+------------------------+---------------+---------------+ | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY | +================================+========================+===============+===============+ | t_strategy_execute_queue_offli | idx_create_time_status | create_time | 498223 | | ne_fruugo | | | | +--------------------------------+------------------------+---------------+---------------+ | t_strategy_execute_queue_offli | PRIMARY | id | 7746905 | | ne_fruugo | | | | +--------------------------------+------------------------+---------------+---------------+
    027-
    028- table
    029-
    030-
    031- partitions
    032-
    033-
    034- type
    035-
    036-
    037- possible_keys
    038-
    039-
    040- key
    041-
    042-
    043- key_len
    044-
    045-
    046- ref
    047-
    048-
    049- rows
    050-
    051-
    052- filtered
    053-
    054-
    055- Extra
    056-
    057-
    058-
    059-
    060-
    061-
    062- 1
    063-
    064-
    065- SIMPLE
    066-
    067-
    068- t_strategy_execute_queue_offline_fruugo
    069-
    070-
    071- None
    072-
    073-
    074- range
    075-
    076-
    077- PRIMARY,idx_source_id,idx_source_id_status,idx_create_time_status
    078-
    079-
    080- PRIMARY
    081-
    082-
    083- 8
    084-
    085-
    086- None
    087-
    088-
    089- 3961123
    090-
    091-
    092- 0.57
    093-
    094-
    095- Using where
    096-
    097-
    098-
    099-
    100-
    101- 额外建议:
    102- 索引建议:
    103- 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【96730】 条,没有必要为该字段创建索引。
    104-
    105- 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【80375】 条,没有必要为该字段创建索引。
    106-
    107- 建议添加索引:ALTER TABLE t_strategy_execute_queue_offline_fruugo ADD INDEX idx_id_create_time(id,create_time);
    108-
    109- 【t_strategy_execute_queue_offline_fruugo】表 【id,create_time】字段,索引分析:
    110- +--------------------------------+------------------------+---------------+---------------+
    111- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
    112- +================================+========================+===============+===============+
    113- | t_strategy_execute_queue_offli | idx_create_time_status | create_time | 498223 |
    114- | ne_fruugo | | | |
    115- +--------------------------------+------------------------+---------------+---------------+
    116- | t_strategy_execute_queue_offli | PRIMARY | id | 7746905 |
    117- | ne_fruugo | | | |
    118- +--------------------------------+------------------------+---------------+---------------+
    119-
    120-
    001- 反馈人:袁慧斌<br />
    001+ 反馈人:袁慧斌<br /> 数据库:zhcxkj_center_strategy_comprehensive<br /> 查询时间:31.5849<br /> 执行次数: 40<br /> 扫描行数:923209<br /> 发送行数:1000<br /> 指纹SQL: SELECT id , retry_status , source_id , country_code FROM ? WHERE ( id &gt; ? AND source_id = ? AND status = ? AND create_time &lt;= ? ) limit ? ;<br /> 真实SQL:SELECT id,retry_status,source_id,country_code FROM t_strategy_execute_queue_offline_fruugo WHERE (id &gt; 726341 AND source_id = 27739 AND status = 5 AND create_time &lt;= 2025-11-01 00:00:00) limit 1000;<br /> 无人工修改<br /> AISQL修改建议:CREATE INDEX idx_optimized ON t_strategy_execute_queue_offline_fruugo (source_id, status, create_time, id);<br /> explain表:<br /><br /><br /><br /><br /><br /><br /><table><tbody><tr><th>id</th>
    002- 数据库:zhcxkj_center_strategy_comprehensive<br />
    002+ <th>select_type</th>
    003- 查询时间:31.5849<br />
    003+ <th>table</th>
    004- 执行次数: 40<br />
    004+ <th>partitions</th>
    005- 扫描行数:923209<br />
    005+ <th>type</th>
    006- 发送行数:1000<br />
    006+ <th>possible_keys</th>
    007- 指纹SQL: SELECT id , retry_status , source_id , country_code FROM ? WHERE ( id &gt; ? AND source_id = ? AND status = ? AND create_time &lt;= ? ) limit ? ;<br />
    007+ <th>key</th>
    008- 真实SQL:SELECT id,retry_status,source_id,country_code FROM t_strategy_execute_queue_offline_fruugo WHERE (id &gt; 726341 AND source_id = 27739 AND status = 5 AND create_time &lt;= 2025-11-01 00:00:00) limit 1000;<br />
    008+ <th>key_len</th>
    009- 无人工修改<br />
    009+ <th>ref</th>
    010- AISQL修改建议:CREATE INDEX idx_optimized ON t_strategy_execute_queue_offline_fruugo (source_id, status, create_time, id);<br />
    010+ <th>rows</th>
    011- explain表:<br />
    011+ <th>filtered</th>
    012- <br />
    012+ <th>Extra</th>
    013- <br />
    013+ </tr></tbody><tbody><tr><td>1</td>
    014- <br />
    014+ <td>SIMPLE</td>
    015- <br />
    015+ <td>t_strategy_execute_queue_offline_fruugo</td>
    016- <br />
    016+ <td>None</td>
    017- <br />
    017+ <td>range</td>
    018- <table>
    018+ <td>PRIMARY,idx_source_id,idx_source_id_status,idx_create_time_status</td>
    019- <tbody>
    019+ <td>PRIMARY</td>
    020- <tr>
    020+ <td>8</td>
    021- <th>
    021+ <td>None</td>
    022- id
    022+ <td>3961123</td>
    023- </th>
    023+ <td>0.57</td>
    024- <th>
    024+ <td>Using where</td>
    025- select_type
    025+ </tr></tbody></table><br />
    026- </th>
    026+ 额外建议:<br /> 索引建议:<br /> 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【96730】 条,没有必要为该字段创建索引。<br /><br /> 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【80375】 条,没有必要为该字段创建索引。<br /><span style="color:#FFA500;"><br /> 建议添加索引:ALTER TABLE t_strategy_execute_queue_offline_fruugo ADD INDEX idx_id_create_time(id,create_time);</span><br /><br /> 【t_strategy_execute_queue_offline_fruugo】表 【id,create_time】字段,索引分析:<br /> +--------------------------------+------------------------+---------------+---------------+<br /> | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br /> +================================+========================+===============+===============+<br /> | t_strategy_execute_queue_offli | idx_create_time_status | create_time | 498223 |<br /> | ne_fruugo | | | |<br /> +--------------------------------+------------------------+---------------+---------------+<br /> | t_strategy_execute_queue_offli | PRIMARY | id | 7746905 |<br /> | ne_fruugo | | | |<br /> +--------------------------------+------------------------+---------------+---------------+<br /><br /><br />
    027- <th>
    028- table
    029- </th>
    030- <th>
    031- partitions
    032- </th>
    033- <th>
    034- type
    035- </th>
    036- <th>
    037- possible_keys
    038- </th>
    039- <th>
    040- key
    041- </th>
    042- <th>
    043- key_len
    044- </th>
    045- <th>
    046- ref
    047- </th>
    048- <th>
    049- rows
    050- </th>
    051- <th>
    052- filtered
    053- </th>
    054- <th>
    055- Extra
    056- </th>
    057- </tr>
    058- </tbody>
    059- <tbody>
    060- <tr>
    061- <td>
    062- 1
    063- </td>
    064- <td>
    065- SIMPLE
    066- </td>
    067- <td>
    068- t_strategy_execute_queue_offline_fruugo
    069- </td>
    070- <td>
    071- None
    072- </td>
    073- <td>
    074- range
    075- </td>
    076- <td>
    077- PRIMARY,idx_source_id,idx_source_id_status,idx_create_time_status
    078- </td>
    079- <td>
    080- PRIMARY
    081- </td>
    082- <td>
    083- 8
    084- </td>
    085- <td>
    086- None
    087- </td>
    088- <td>
    089- 3961123
    090- </td>
    091- <td>
    092- 0.57
    093- </td>
    094- <td>
    095- Using where
    096- </td>
    097- </tr>
    098- </tbody>
    099- </table>
    100- <br />
    101- 额外建议:<br />
    102- 索引建议:<br />
    103- 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【96730】 条,没有必要为该字段创建索引。<br />
    104- <br />
    105- 取出表 【t_strategy_execute_queue_offline_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【80375】 条,没有必要为该字段创建索引。<br />
    106- <span style="color:FFA500;"><br />
    107- 建议添加索引:ALTER TABLE t_strategy_execute_queue_offline_fruugo ADD INDEX idx_id_create_time(id,create_time);</span><br />
    108- <br />
    109- 【t_strategy_execute_queue_offline_fruugo】表 【id,create_time】字段,索引分析:<br />
    110- +--------------------------------+------------------------+---------------+---------------+<br />
    111- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br />
    112- +================================+========================+===============+===============+<br />
    113- | t_strategy_execute_queue_offli | idx_create_time_status | create_time | 498223 |<br />
    114- | ne_fruugo | | | |<br />
    115- +--------------------------------+------------------------+---------------+---------------+<br />
    116- | t_strategy_execute_queue_offli | PRIMARY | id | 7746905 |<br />
    117- | ne_fruugo | | | |<br />
    118- +--------------------------------+------------------------+---------------+---------------+<br />
    119- <br />
    120- <br />
  4. 2025-11-07 14:55:45, 由 陈莉珍 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "chenlizhen",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "chenlizhen"。
    修改了 关闭日期,旧值为 "",新值为 "2025-11-07 14:55:45"。
所属项目 技术中心-需求池
所属模块 多平台   OZON
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P1
Bug状态 已关闭
业务部门 总经办
影响功能
开发责任人 蔡俊伟
测试责任人 蔡俊伟
解决时效 32.1
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2025-11-07 14:55:45
截止日期 0000-00-00
上线时间 2025-11-06 19:10:44
上线时效 32.1
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 陈莉珍 于 2025-11-05 11:04:28
影响环境 生产环境-业务反馈
由谁解决 蔡俊伟 于 2025-11-06 19:10:44
解决版本 主干
解决方案 性能问题
由谁关闭 陈莉珍 于 2025-11-07 14:55:45
最后修改 陈莉珍 于 2025-11-07 14:55:45
相关Bug