重现步骤
反馈人:王凯
数据库:zhcxkj_center_risk
查询时间:201.316
执行次数: 231
扫描行数:41322600
发送行数:1282.2
指纹SQL: select 'id' , 'flyback_task_id' , 'flyback_result_id' , 'product_id' , 'sku' , 'audit_status' , 'law_firm_agent_status' , 'similarity' , 'url' , 'name' , 'patent_library_id' , 'source_type' , 'area_id' , 'create_by' , 'create_time' , 'update_by' , 'update_time' , 'is_deleted' FROM ? where ( update_time >= replace ( '?' , '?' , '?' ) ) ;
真实SQL:select 'id','flyback_task_id','flyback_result_id','product_id','sku','audit_status','law_firm_agent_status','similarity','url','name','patent_library_id','source_type','area_id','create_by','create_time','update_by','update_time','is_deleted' from t_patent_flyback_result_detail where (update_time>= replace('2025-08-24 07:50:11','%',' '));
##无人工修改##
AISQL修改建议:# 优化后的SQL语句


SELECT 'id', 'flyback_task_id', 'flyback_result_id', 'product_id', 'sku',
'audit_status', 'law_firm_agent_status', 'similarity', 'url', 'name',
'patent_library_id', 'source_type', 'area_id', 'create_by', 'create_time',
'update_by', 'update_time', 'is_deleted'
FROM t_patent_flyback_result_detail
WHERE update_time >= STR_TO_DATE('2025-08-24 07:50:11', '%Y-%m-%d %H:%i:%s');


优化说明:
1. 使用STR_TO_DATE函数替代REPLACE函数处理日期字符串,这是更规范的方式
2. 移除了不必要的括号,使SQL更简洁
3. 格式化列名排列,提高可读性

如果'update_time'字段没有索引,建议添加索引以进一步提升性能:

ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time (update_time);
explain表:






id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t_patent_flyback_result_detail None ALL None None None None 40824748 33.33 Using where

额外建议:
索引建议:
建议添加索引:ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time(update_time);


【t_patent_flyback_result_detail】表 【update_time】字段,索引分析:
+--------------+--------------+---------------+---------------+
| TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
+==============+==============+===============+===============+
+--------------+--------------+---------------+---------------+


历史记录  
  1. 2025-08-25 15:58:22, 由 李乐同 创建。
  2. 2025-08-25 16:01:27, 由 周海坤 指派给 柯栋。
    修改了 指派给,旧值为 "zhouhaikun",新值为 "kedong"。
  3. 2025-08-25 16:02:15, 由 周海坤 编辑。
    修改了 所属模块,旧值为 "0",新值为 "1842"。
    修改了 业务部门,旧值为 "0",新值为 "2"。
    修改了 解决时效,旧值为 "0",新值为 "-1"。
    修改了 重现步骤,区别为:
    001- 反馈人:王凯
    001+ 反馈人:王凯 数据库:zhcxkj_center_risk 查询时间:201.316 执行次数: 231 扫描行数:41322600 发送行数:1282.2 指纹SQL: select 'id' , 'flyback_task_id' , 'flyback_result_id' , 'product_id' , 'sku' , 'audit_status' , 'law_firm_agent_status' , 'similarity' , 'url' , 'name' , 'patent_library_id' , 'source_type' , 'area_id' , 'create_by' , 'create_time' , 'update_by' , 'update_time' , 'is_deleted' FROM ? where ( update_time >= replace ( '?' , '?' , '?' ) ) ; 真实SQL:select 'id','flyback_task_id','flyback_result_id','product_id','sku','audit_status','law_firm_agent_status','similarity','url','name','patent_library_id','source_type','area_id','create_by','create_time','update_by','update_time','is_deleted' from t_patent_flyback_result_detail where (update_time>= replace('2025-08-24 07:50:11','%',' ')); ##无人工修改## AISQL修改建议:# 优化后的SQL语句 SELECT 'id', 'flyback_task_id', 'flyback_result_id', 'product_id', 'sku', 'audit_status', 'law_firm_agent_status', 'similarity', 'url', 'name', 'patent_library_id', 'source_type', 'area_id', 'create_by', 'create_time', 'update_by', 'update_time', 'is_deleted' FROM t_patent_flyback_result_detail WHERE update_time >= STR_TO_DATE('2025-08-24 07:50:11', '%Y-%m-%d %H:%i:%s'); 优化说明: 1. 使用STR_TO_DATE函数替代REPLACE函数处理日期字符串,这是更规范的方式 2. 移除了不必要的括号,使SQL更简洁 3. 格式化列名排列,提高可读性 如果'update_time'字段没有索引,建议添加索引以进一步提升性能: ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time (update_time); explain表:id
    002- 数据库:zhcxkj_center_risk
    002+ select_type
    003- 查询时间:201.316
    003+ table
    004- 执行次数: 231
    004+ partitions
    005- 扫描行数:41322600
    005+ type
    006- 发送行数:1282.2
    006+ possible_keys
    007- 指纹SQL: select 'id' , 'flyback_task_id' , 'flyback_result_id' , 'product_id' , 'sku' , 'audit_status' , 'law_firm_agent_status' , 'similarity' , 'url' , 'name' , 'patent_library_id' , 'source_type' , 'area_id' , 'create_by' , 'create_time' , 'update_by' , 'update_time' , 'is_deleted' FROM ? where ( update_time >= replace ( '?' , '?' , '?' ) ) ;
    007+ key
    008- 真实SQL:select 'id','flyback_task_id','flyback_result_id','product_id','sku','audit_status','law_firm_agent_status','similarity','url','name','patent_library_id','source_type','area_id','create_by','create_time','update_by','update_time','is_deleted' from t_patent_flyback_result_detail where (update_time>= replace('2025-08-24 07:50:11','%',' '));
    008+ key_len
    009- ##无人工修改##
    009+ ref
    010- AISQL修改建议:# 优化后的SQL语句
    010+ rows
    011-
    011+ filtered
    012-
    012+ Extra
    013- SELECT 'id', 'flyback_task_id', 'flyback_result_id', 'product_id', 'sku',
    013+ 1
    014- 'audit_status', 'law_firm_agent_status', 'similarity', 'url', 'name',
    014+ SIMPLE
    015- 'patent_library_id', 'source_type', 'area_id', 'create_by', 'create_time',
    015+ t_patent_flyback_result_detail
    016- 'update_by', 'update_time', 'is_deleted'
    016+ None
    017- FROM t_patent_flyback_result_detail
    017+ ALL
    018- WHERE update_time >= STR_TO_DATE('2025-08-24 07:50:11', '%Y-%m-%d %H:%i:%s');
    018+ None
    019-
    019+ None
    020-
    020+ None
    021- 优化说明:
    021+ None
    022- 1. 使用STR_TO_DATE函数替代REPLACE函数处理日期字符串,这是更规范的方式
    022+ 40824748
    023- 2. 移除了不必要的括号,使SQL更简洁
    023+ 33.33
    024- 3. 格式化列名排列,提高可读性
    024+ Using where
    025-
    025+
    026- 如果'update_time'字段没有索引,建议添加索引以进一步提升性能:
    026+ 额外建议: 索引建议: 建议添加索引:ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time(update_time); 【t_patent_flyback_result_detail】表 【update_time】字段,索引分析: +--------------+--------------+---------------+---------------+ | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY | +==============+==============+===============+===============+ +--------------+--------------+---------------+---------------+
    027-
    028- ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time (update_time);
    029- explain表:
    030-
    031-
    032-
    033-
    034-
    035-
    036-
    037-
    038-
    039-
    040- id
    041-
    042-
    043- select_type
    044-
    045-
    046- table
    047-
    048-
    049- partitions
    050-
    051-
    052- type
    053-
    054-
    055- possible_keys
    056-
    057-
    058- key
    059-
    060-
    061- key_len
    062-
    063-
    064- ref
    065-
    066-
    067- rows
    068-
    069-
    070- filtered
    071-
    072-
    073- Extra
    074-
    075-
    076-
    077-
    078-
    079-
    080- 1
    081-
    082-
    083- SIMPLE
    084-
    085-
    086- t_patent_flyback_result_detail
    087-
    088-
    089- None
    090-
    091-
    092- ALL
    093-
    094-
    095- None
    096-
    097-
    098- None
    099-
    100-
    101- None
    102-
    103-
    104- None
    105-
    106-
    107- 40824748
    108-
    109-
    110- 33.33
    111-
    112-
    113- Using where
    114-
    115-
    116-
    117-
    118-
    119- 额外建议:
    120- 索引建议:
    121- 建议添加索引:ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time(update_time);
    122-
    123- 【t_patent_flyback_result_detail】表 【update_time】字段,索引分析:
    124- +--------------+--------------+---------------+---------------+
    125- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
    126- +==============+==============+===============+===============+
    127- +--------------+--------------+---------------+---------------+
    128-
    129-
    001- 反馈人:王凯<br />
    001+ 反馈人:王凯<br /> 数据库:zhcxkj_center_risk<br /> 查询时间:201.316<br /> 执行次数: 231<br /> 扫描行数:41322600<br /> 发送行数:1282.2<br /> 指纹SQL: select 'id' , 'flyback_task_id' , 'flyback_result_id' , 'product_id' , 'sku' , 'audit_status' , 'law_firm_agent_status' , 'similarity' , 'url' , 'name' , 'patent_library_id' , 'source_type' , 'area_id' , 'create_by' , 'create_time' , 'update_by' , 'update_time' , 'is_deleted' FROM ? where ( update_time &gt;= replace ( '?' , '?' , '?' ) ) ;<br /> 真实SQL:select 'id','flyback_task_id','flyback_result_id','product_id','sku','audit_status','law_firm_agent_status','similarity','url','name','patent_library_id','source_type','area_id','create_by','create_time','update_by','update_time','is_deleted' from t_patent_flyback_result_detail where (update_time&gt;= replace('2025-08-24 07:50:11','%',' '));<br /> ##无人工修改##<br /> AISQL修改建议:# 优化后的SQL语句<br /><br /><br /> SELECT 'id', 'flyback_task_id', 'flyback_result_id', 'product_id', 'sku', <br /> 'audit_status', 'law_firm_agent_status', 'similarity', 'url', 'name', <br /> 'patent_library_id', 'source_type', 'area_id', 'create_by', 'create_time', <br /> 'update_by', 'update_time', 'is_deleted'<br /> FROM t_patent_flyback_result_detail<br /> WHERE update_time &gt;= STR_TO_DATE('2025-08-24 07:50:11', '%Y-%m-%d %H:%i:%s');<br /><br /><br /> 优化说明:<br /> 1. 使用STR_TO_DATE函数替代REPLACE函数处理日期字符串,这是更规范的方式<br /> 2. 移除了不必要的括号,使SQL更简洁<br /> 3. 格式化列名排列,提高可读性<br /><br /> 如果'update_time'字段没有索引,建议添加索引以进一步提升性能:<br /><br /> ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time (update_time);<br /> explain表:<br /><br /><br /><br /><br /><br /><br /><table><tbody><tr><th>id</th>
    002- 数据库:zhcxkj_center_risk<br />
    002+ <th>select_type</th>
    003- 查询时间:201.316<br />
    003+ <th>table</th>
    004- 执行次数: 231<br />
    004+ <th>partitions</th>
    005- 扫描行数:41322600<br />
    005+ <th>type</th>
    006- 发送行数:1282.2<br />
    006+ <th>possible_keys</th>
    007- 指纹SQL: select 'id' , 'flyback_task_id' , 'flyback_result_id' , 'product_id' , 'sku' , 'audit_status' , 'law_firm_agent_status' , 'similarity' , 'url' , 'name' , 'patent_library_id' , 'source_type' , 'area_id' , 'create_by' , 'create_time' , 'update_by' , 'update_time' , 'is_deleted' FROM ? where ( update_time &gt;= replace ( '?' , '?' , '?' ) ) ;<br />
    007+ <th>key</th>
    008- 真实SQL:select 'id','flyback_task_id','flyback_result_id','product_id','sku','audit_status','law_firm_agent_status','similarity','url','name','patent_library_id','source_type','area_id','create_by','create_time','update_by','update_time','is_deleted' from t_patent_flyback_result_detail where (update_time&gt;= replace('2025-08-24 07:50:11','%',' '));<br />
    008+ <th>key_len</th>
    009- ##无人工修改##<br />
    009+ <th>ref</th>
    010- AISQL修改建议:# 优化后的SQL语句<br />
    010+ <th>rows</th>
    011- <br />
    011+ <th>filtered</th>
    012- <br />
    012+ <th>Extra</th>
    013- SELECT 'id', 'flyback_task_id', 'flyback_result_id', 'product_id', 'sku', <br />
    013+ </tr></tbody><tbody><tr><td>1</td>
    014- 'audit_status', 'law_firm_agent_status', 'similarity', 'url', 'name', <br />
    014+ <td>SIMPLE</td>
    015- 'patent_library_id', 'source_type', 'area_id', 'create_by', 'create_time', <br />
    015+ <td>t_patent_flyback_result_detail</td>
    016- 'update_by', 'update_time', 'is_deleted'<br />
    016+ <td>None</td>
    017- FROM t_patent_flyback_result_detail<br />
    017+ <td>ALL</td>
    018- WHERE update_time &gt;= STR_TO_DATE('2025-08-24 07:50:11', '%Y-%m-%d %H:%i:%s');<br />
    018+ <td>None</td>
    019- <br />
    019+ <td>None</td>
    020- <br />
    020+ <td>None</td>
    021- 优化说明:<br />
    021+ <td>None</td>
    022- 1. 使用STR_TO_DATE函数替代REPLACE函数处理日期字符串,这是更规范的方式<br />
    022+ <td>40824748</td>
    023- 2. 移除了不必要的括号,使SQL更简洁<br />
    023+ <td>33.33</td>
    024- 3. 格式化列名排列,提高可读性<br />
    024+ <td>Using where</td>
    025- <br />
    025+ </tr></tbody></table><br />
    026- 如果'update_time'字段没有索引,建议添加索引以进一步提升性能:<br />
    026+ 额外建议:<br /> 索引建议:<span style="color:#FFA500;"><br /> 建议添加索引:ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time(update_time);</span><br /><br /> 【t_patent_flyback_result_detail】表 【update_time】字段,索引分析:<br /> +--------------+--------------+---------------+---------------+<br /> | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br /> +==============+==============+===============+===============+<br /> +--------------+--------------+---------------+---------------+<br /><br /><br />
    027- <br />
    028- ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time (update_time);<br />
    029- explain表:<br />
    030- <br />
    031- <br />
    032- <br />
    033- <br />
    034- <br />
    035- <br />
    036- <table>
    037- <tbody>
    038- <tr>
    039- <th>
    040- id
    041- </th>
    042- <th>
    043- select_type
    044- </th>
    045- <th>
    046- table
    047- </th>
    048- <th>
    049- partitions
    050- </th>
    051- <th>
    052- type
    053- </th>
    054- <th>
    055- possible_keys
    056- </th>
    057- <th>
    058- key
    059- </th>
    060- <th>
    061- key_len
    062- </th>
    063- <th>
    064- ref
    065- </th>
    066- <th>
    067- rows
    068- </th>
    069- <th>
    070- filtered
    071- </th>
    072- <th>
    073- Extra
    074- </th>
    075- </tr>
    076- </tbody>
    077- <tbody>
    078- <tr>
    079- <td>
    080- 1
    081- </td>
    082- <td>
    083- SIMPLE
    084- </td>
    085- <td>
    086- t_patent_flyback_result_detail
    087- </td>
    088- <td>
    089- None
    090- </td>
    091- <td>
    092- ALL
    093- </td>
    094- <td>
    095- None
    096- </td>
    097- <td>
    098- None
    099- </td>
    100- <td>
    101- None
    102- </td>
    103- <td>
    104- None
    105- </td>
    106- <td>
    107- 40824748
    108- </td>
    109- <td>
    110- 33.33
    111- </td>
    112- <td>
    113- Using where
    114- </td>
    115- </tr>
    116- </tbody>
    117- </table>
    118- <br />
    119- 额外建议:<br />
    120- 索引建议:<span style="color:#FFA500;"><br />
    121- 建议添加索引:ALTER TABLE t_patent_flyback_result_detail ADD INDEX idx_update_time(update_time);</span><br />
    122- <br />
    123- 【t_patent_flyback_result_detail】表 【update_time】字段,索引分析:<br />
    124- +--------------+--------------+---------------+---------------+<br />
    125- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br />
    126- +==============+==============+===============+===============+<br />
    127- +--------------+--------------+---------------+---------------+<br />
    128- <br />
    129- <br />
    粤利设计表,目前已经加了索引
  4. 2025-08-25 16:03:37, 由 柯栋 解决,方案为 系统设计缺陷 。
    修改了 解决方案,旧值为 "",新值为 "bydesign"。
    修改了 解决日期,旧值为 "",新值为 "2025-08-25 16:03:09"。
    修改了 指派给 ,旧值为 "kedong",新值为 ""。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "kedong"。
  5. 2025-08-25 16:31:47, 由 李乐同 指派给 陈莉珍。
    修改了 指派给,旧值为 "",新值为 "chenlizhen"。
  6. 2025-08-25 16:32:02, 由 李乐同 指派给 李乐同。
    修改了 指派给,旧值为 "chenlizhen",新值为 "liletong"。
  7. 2025-08-25 16:32:34, 由 李乐同 编辑。
    修改了 开发责任人,旧值为 "",新值为 "zhangxing"。
    修改了 测试责任人,旧值为 "",新值为 "pengzhangquan"。
    修改了 解决时效 ,旧值为 "0",新值为 "0.08"。
  8. 2025-08-25 16:32:51, 由 李乐同 编辑。
    修改了 上线时间,旧值为 "0000-00-00 00:00:00",新值为 "2025-08-25 16:32"。
    修改了 上线时效,旧值为 "-1",新值为 "0.56"。
  9. 2025-08-25 16:33:51, 由 李乐同 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "liletong",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "liletong"。
    修改了 关闭日期,旧值为 "",新值为 "2025-08-25 16:33:51"。
所属项目 技术中心-需求池
所属模块 亚马逊
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P2
Bug状态 已关闭
业务部门 总经办
影响功能
开发责任人 张星
测试责任人 彭章权
解决时效 0.08
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2025-08-25 16:33:51
截止日期 0000-00-00
上线时间 2025-08-25 16:32:00
上线时效 0.56
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 于 2025-08-25 15:58:22
影响环境 生产环境-业务反馈
由谁解决 柯栋 于 2025-08-25 16:03:09
解决版本
解决方案 系统设计缺陷
由谁关闭 李乐同 于 2025-08-25 16:33:51
最后修改 李乐同 于 2025-08-25 16:33:51
相关Bug