重现步骤
反馈人:袁慧斌
数据库:zhcxkj_center_listing_comprehensive
查询时间:649.104
执行次数: 24
扫描行数:63058400
发送行数:164828
指纹SQL: select id , customer_id , source_id , global_listing_id , name , item_id , item_sku , model_id , model_sku , sku , product_id , product_name_cn , purchase_price , original_price , currency , has_variant , platform_quality , image , properties , status , product_status , default_sku , comb , listing_method , listing_person , salesman_id , salesman , publish_time , un_publish_time , remark , create_by , create_time , update_by , update_time , is_deleted FROM ? where ( update_time < replace ( ? , ? , ? ) AND update_time >= replace ( ? , ? , ? ) ) ;
真实SQL:select id,customer_id,source_id,global_listing_id,name,item_id,item_sku,model_id,model_sku,sku,product_id,product_name_cn,purchase_price,original_price,currency,has_variant,platform_quality,image,properties,status,product_status,default_sku,comb,listing_method,listing_person,salesman_id,salesman,publish_time,un_publish_time,remark,create_by,create_time,update_by,update_time,is_deleted from t_shopee_global_listing_sku where (update_time= replace(2025-12-10 03:47:37,%, ));
无人工修改
AISQL修改建议:SELECT id, customer_id, source_id, global_listing_id, name, item_id, item_sku, model_id, model_sku, sku, product_id, product_name_cn, purchase_price, original_price, currency, has_variant, platform_quality, image, properties, status, product_status, default_sku, comb, listing_method, listing_person, salesman_id, salesman, publish_time, un_publish_time, remark, create_by, create_time, update_by, update_time, is_deleted
FROM t_shopee_global_listing_sku
WHERE update_time >= 2025-12-10 03:47:37
AND update_time < 2025-12-10 04:47:37;


优化说明:
1. 移除了不必要的REPLACE函数调用,直接使用时间字符串比较
2. 调整了WHERE条件的顺序,将更可能缩小结果集的条件放在前面
3. 使用标准的日期时间格式进行比较,避免函数操作以便利用索引
4. 保持查询语义完全一致,只提升执行效率

建议在update_time字段上建立索引以获得最佳性能。
explain表:






id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t_shopee_global_listing_sku None ALL None None None None 58821152 11.11 Using where

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


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


(2025-12-10>
历史记录  
  1. 2025-12-15 09:45:30, 由 陈莉珍 创建。
  2. 2025-12-15 09:47:35, 由 韦思成 指派给 陈祖帆。
    修改了 指派给,旧值为 "weisicheng",新值为 "chenzufang"。
  3. 2025-12-15 09:47:58, 由 韦思成 指派给 陈祖帆。
    修改了 抄送给,旧值为 "",新值为 ",chenlizhen"。
  4. 2025-12-16 19:08:22, 由 陈祖帆 解决,方案为 配置问题 。
    修改了 解决方案,旧值为 "",新值为 "deploy"。
    修改了 解决日期,旧值为 "",新值为 "2025-12-16 19:07:47"。
    修改了 指派给 ,旧值为 "chenzufang",新值为 "chenlizhen"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "chenzufang"。
  5. 2025-12-18 17:56:16, 由 陈莉珍 编辑。
    修改了 所属模块 ,旧值为 "0",新值为 "1869"。
    修改了 业务部门 ,旧值为 "0",新值为 "2"。
    修改了 测试责任人,旧值为 "",新值为 "chenzufang"。
    修改了 解决时效 ,旧值为 "0",新值为 "33.37"。
    修改了 重现步骤 ,区别为:
    001- 反馈人:袁慧斌
    001+ 反馈人:袁慧斌 数据库:zhcxkj_center_listing_comprehensive 查询时间:649.104 执行次数: 24 扫描行数:63058400 发送行数:164828 指纹SQL: select id , customer_id , source_id , global_listing_id , name , item_id , item_sku , model_id , model_sku , sku , product_id , product_name_cn , purchase_price , original_price , currency , has_variant , platform_quality , image , properties , status , product_status , default_sku , comb , listing_method , listing_person , salesman_id , salesman , publish_time , un_publish_time , remark , create_by , create_time , update_by , update_time , is_deleted FROM ? where ( update_time &lt; replace ( ? , ? , ? ) AND update_time &gt;= replace ( ? , ? , ? ) ) ; 真实SQL:select id,customer_id,source_id,global_listing_id,name,item_id,item_sku,model_id,model_sku,sku,product_id,product_name_cn,purchase_price,original_price,currency,has_variant,platform_quality,image,properties,status,product_status,default_sku,comb,listing_method,listing_person,salesman_id,salesman,publish_time,un_publish_time,remark,create_by,create_time,update_by,update_time,is_deleted from t_shopee_global_listing_sku where (update_time= replace(2025-12-10 03:47:37,%, )); 无人工修改 AISQL修改建议:SELECT id, customer_id, source_id, global_listing_id, name, item_id, item_sku, model_id, model_sku, sku, product_id, product_name_cn, purchase_price, original_price, currency, has_variant, platform_quality, image, properties, status, product_status, default_sku, comb, listing_method, listing_person, salesman_id, salesman, publish_time, un_publish_time, remark, create_by, create_time, update_by, update_time, is_deleted FROM t_shopee_global_listing_sku WHERE update_time &gt;= 2025-12-10 03:47:37 AND update_time &lt; 2025-12-10 04:47:37; 优化说明: 1. 移除了不必要的REPLACE函数调用,直接使用时间字符串比较 2. 调整了WHERE条件的顺序,将更可能缩小结果集的条件放在前面 3. 使用标准的日期时间格式进行比较,避免函数操作以便利用索引 4. 保持查询语义完全一致,只提升执行效率 建议在update_time字段上建立索引以获得最佳性能。 explain表:id
    002- 数据库:zhcxkj_center_listing_comprehensive
    002+ select_type
    003- 查询时间:649.104
    003+ table
    004- 执行次数: 24
    004+ partitions
    005- 扫描行数:63058400
    005+ type
    006- 发送行数:164828
    006+ possible_keys
    007- 指纹SQL: select id , customer_id , source_id , global_listing_id , name , item_id , item_sku , model_id , model_sku , sku , product_id , product_name_cn , purchase_price , original_price , currency , has_variant , platform_quality , image , properties , status , product_status , default_sku , comb , listing_method , listing_person , salesman_id , salesman , publish_time , un_publish_time , remark , create_by , create_time , update_by , update_time , is_deleted FROM ? where ( update_time &lt; replace ( ? , ? , ? ) AND update_time &gt;= replace ( ? , ? , ? ) ) ;
    007+ key
    008- 真实SQL:select id,customer_id,source_id,global_listing_id,name,item_id,item_sku,model_id,model_sku,sku,product_id,product_name_cn,purchase_price,original_price,currency,has_variant,platform_quality,image,properties,status,product_status,default_sku,comb,listing_method,listing_person,salesman_id,salesman,publish_time,un_publish_time,remark,create_by,create_time,update_by,update_time,is_deleted from t_shopee_global_listing_sku where (update_time= replace(2025-12-10 03:47:37,%, ));
    008+ key_len
    009- 无人工修改
    009+ ref
    010- AISQL修改建议:SELECT id, customer_id, source_id, global_listing_id, name, item_id, item_sku, model_id, model_sku, sku, product_id, product_name_cn, purchase_price, original_price, currency, has_variant, platform_quality, image, properties, status, product_status, default_sku, comb, listing_method, listing_person, salesman_id, salesman, publish_time, un_publish_time, remark, create_by, create_time, update_by, update_time, is_deleted
    010+ rows
    011- FROM t_shopee_global_listing_sku
    011+ filtered
    012- WHERE update_time &gt;= 2025-12-10 03:47:37
    012+ Extra
    013- AND update_time &lt; 2025-12-10 04:47:37;
    013+ 1
    014-
    014+ SIMPLE
    015-
    015+ t_shopee_global_listing_sku
    016- 优化说明:
    016+ None
    017- 1. 移除了不必要的REPLACE函数调用,直接使用时间字符串比较
    017+ ALL
    018- 2. 调整了WHERE条件的顺序,将更可能缩小结果集的条件放在前面
    018+ None
    019- 3. 使用标准的日期时间格式进行比较,避免函数操作以便利用索引
    019+ None
    020- 4. 保持查询语义完全一致,只提升执行效率
    020+ None
    021-
    021+ None
    022- 建议在update_time字段上建立索引以获得最佳性能。
    022+ 58821152
    023- explain表:
    023+ 11.11
    024-
    024+ Using where
    025-
    025+
    026-
    026+ 额外建议: 索引建议: 建议添加索引:ALTER TABLE t_shopee_global_listing_sku ADD INDEX idx_update_time(update_time); 【t_shopee_global_listing_sku】表 【update_time】字段,索引分析: +--------------+--------------+---------------+---------------+ | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY | +==============+==============+===============+===============+ +--------------+--------------+---------------+---------------+(2025-12-10&gt;
    027-
    028-
    029-
    030-
    031-
    032-
    033-
    034- id
    035-
    036-
    037- select_type
    038-
    039-
    040- table
    041-
    042-
    043- partitions
    044-
    045-
    046- type
    047-
    048-
    049- possible_keys
    050-
    051-
    052- key
    053-
    054-
    055- key_len
    056-
    057-
    058- ref
    059-
    060-
    061- rows
    062-
    063-
    064- filtered
    065-
    066-
    067- Extra
    068-
    069-
    070-
    071-
    072-
    073-
    074- 1
    075-
    076-
    077- SIMPLE
    078-
    079-
    080- t_shopee_global_listing_sku
    081-
    082-
    083- None
    084-
    085-
    086- ALL
    087-
    088-
    089- None
    090-
    091-
    092- None
    093-
    094-
    095- None
    096-
    097-
    098- None
    099-
    100-
    101- 58821152
    102-
    103-
    104- 11.11
    105-
    106-
    107- Using where
    108-
    109-
    110-
    111-
    112-
    113- 额外建议:
    114- 索引建议:
    115- 建议添加索引:ALTER TABLE t_shopee_global_listing_sku ADD INDEX idx_update_time(update_time);
    116-
    117- 【t_shopee_global_listing_sku】表 【update_time】字段,索引分析:
    118- +--------------+--------------+---------------+---------------+
    119- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
    120- +==============+==============+===============+===============+
    121- +--------------+--------------+---------------+---------------+
    122-
    123-
    124-
    001- 反馈人:袁慧斌<br />
    001+ 反馈人:袁慧斌<br /> 数据库:zhcxkj_center_listing_comprehensive<br /> 查询时间:649.104<br /> 执行次数: 24<br /> 扫描行数:63058400<br /> 发送行数:164828<br /> 指纹SQL: select id , customer_id , source_id , global_listing_id , name , item_id , item_sku , model_id , model_sku , sku , product_id , product_name_cn , purchase_price , original_price , currency , has_variant , platform_quality , image , properties , status , product_status , default_sku , comb , listing_method , listing_person , salesman_id , salesman , publish_time , un_publish_time , remark , create_by , create_time , update_by , update_time , is_deleted FROM ? where ( update_time &lt; replace ( ? , ? , ? ) AND update_time &gt;= replace ( ? , ? , ? ) ) ;<br /> 真实SQL:select id,customer_id,source_id,global_listing_id,name,item_id,item_sku,model_id,model_sku,sku,product_id,product_name_cn,purchase_price,original_price,currency,has_variant,platform_quality,image,properties,status,product_status,default_sku,comb,listing_method,listing_person,salesman_id,salesman,publish_time,un_publish_time,remark,create_by,create_time,update_by,update_time,is_deleted from t_shopee_global_listing_sku where (update_time= replace(2025-12-10 03:47:37,%, ));<br /> 无人工修改<br /> AISQL修改建议:SELECT id, customer_id, source_id, global_listing_id, name, item_id, item_sku, model_id, model_sku, sku, product_id, product_name_cn, purchase_price, original_price, currency, has_variant, platform_quality, image, properties, status, product_status, default_sku, comb, listing_method, listing_person, salesman_id, salesman, publish_time, un_publish_time, remark, create_by, create_time, update_by, update_time, is_deleted<br /> FROM t_shopee_global_listing_sku<br /> WHERE update_time &gt;= 2025-12-10 03:47:37 <br /> AND update_time &lt; 2025-12-10 04:47:37;<br /><br /><br /> 优化说明:<br /> 1. 移除了不必要的REPLACE函数调用,直接使用时间字符串比较<br /> 2. 调整了WHERE条件的顺序,将更可能缩小结果集的条件放在前面<br /> 3. 使用标准的日期时间格式进行比较,避免函数操作以便利用索引<br /> 4. 保持查询语义完全一致,只提升执行效率<br /><br /> 建议在update_time字段上建立索引以获得最佳性能。<br /> explain表:<br /><br /><br /><br /><br /><br /><br /><table><tbody><tr><th>id</th>
    002- 数据库:zhcxkj_center_listing_comprehensive<br />
    002+ <th>select_type</th>
    003- 查询时间:649.104<br />
    003+ <th>table</th>
    004- 执行次数: 24<br />
    004+ <th>partitions</th>
    005- 扫描行数:63058400<br />
    005+ <th>type</th>
    006- 发送行数:164828<br />
    006+ <th>possible_keys</th>
    007- 指纹SQL: select id , customer_id , source_id , global_listing_id , name , item_id , item_sku , model_id , model_sku , sku , product_id , product_name_cn , purchase_price , original_price , currency , has_variant , platform_quality , image , properties , status , product_status , default_sku , comb , listing_method , listing_person , salesman_id , salesman , publish_time , un_publish_time , remark , create_by , create_time , update_by , update_time , is_deleted FROM ? where ( update_time &lt; replace ( ? , ? , ? ) AND update_time &gt;= replace ( ? , ? , ? ) ) ;<br />
    007+ <th>key</th>
    008- 真实SQL:select id,customer_id,source_id,global_listing_id,name,item_id,item_sku,model_id,model_sku,sku,product_id,product_name_cn,purchase_price,original_price,currency,has_variant,platform_quality,image,properties,status,product_status,default_sku,comb,listing_method,listing_person,salesman_id,salesman,publish_time,un_publish_time,remark,create_by,create_time,update_by,update_time,is_deleted from t_shopee_global_listing_sku where (update_time<replace(2025-12-10 04:47:37,%,="" )="" and="" update_time="">= replace(2025-12-10 03:47:37,%, ));<br />
    008+ <th>key_len</th>
    009- 无人工修改<br />
    009+ <th>ref</th>
    010- AISQL修改建议:SELECT id, customer_id, source_id, global_listing_id, name, item_id, item_sku, model_id, model_sku, sku, product_id, product_name_cn, purchase_price, original_price, currency, has_variant, platform_quality, image, properties, status, product_status, default_sku, comb, listing_method, listing_person, salesman_id, salesman, publish_time, un_publish_time, remark, create_by, create_time, update_by, update_time, is_deleted<br />
    010+ <th>rows</th>
    011- FROM t_shopee_global_listing_sku<br />
    011+ <th>filtered</th>
    012- WHERE update_time &gt;= 2025-12-10 03:47:37 <br />
    012+ <th>Extra</th>
    013- AND update_time &lt; 2025-12-10 04:47:37;<br />
    013+ </tr></tbody><tbody><tr><td>1</td>
    014- <br />
    014+ <td>SIMPLE</td>
    015- <br />
    015+ <td>t_shopee_global_listing_sku</td>
    016- 优化说明:<br />
    016+ <td>None</td>
    017- 1. 移除了不必要的REPLACE函数调用,直接使用时间字符串比较<br />
    017+ <td>ALL</td>
    018- 2. 调整了WHERE条件的顺序,将更可能缩小结果集的条件放在前面<br />
    018+ <td>None</td>
    019- 3. 使用标准的日期时间格式进行比较,避免函数操作以便利用索引<br />
    019+ <td>None</td>
    020- 4. 保持查询语义完全一致,只提升执行效率<br />
    020+ <td>None</td>
    021- <br />
    021+ <td>None</td>
    022- 建议在update_time字段上建立索引以获得最佳性能。<br />
    022+ <td>58821152</td>
    023- explain表:<br />
    023+ <td>11.11</td>
    024- <br />
    024+ <td>Using where</td>
    025- <br />
    025+ </tr></tbody></table><br />
    026- <br />
    026+ 额外建议:<br /> 索引建议:<span style="color:#FFA500;"><br /> 建议添加索引:ALTER TABLE t_shopee_global_listing_sku ADD INDEX idx_update_time(update_time);</span><br /><br /> 【t_shopee_global_listing_sku】表 【update_time】字段,索引分析:<br /> +--------------+--------------+---------------+---------------+<br /> | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br /> +==============+==============+===============+===============+<br /> +--------------+--------------+---------------+---------------+<br /><br /><br />(2025-12-10&gt;
    027- <br />
    028- <br />
    029- <br />
    030- <table>
    031- <tbody>
    032- <tr>
    033- <th>
    034- id
    035- </th>
    036- <th>
    037- select_type
    038- </th>
    039- <th>
    040- table
    041- </th>
    042- <th>
    043- partitions
    044- </th>
    045- <th>
    046- type
    047- </th>
    048- <th>
    049- possible_keys
    050- </th>
    051- <th>
    052- key
    053- </th>
    054- <th>
    055- key_len
    056- </th>
    057- <th>
    058- ref
    059- </th>
    060- <th>
    061- rows
    062- </th>
    063- <th>
    064- filtered
    065- </th>
    066- <th>
    067- Extra
    068- </th>
    069- </tr>
    070- </tbody>
    071- <tbody>
    072- <tr>
    073- <td>
    074- 1
    075- </td>
    076- <td>
    077- SIMPLE
    078- </td>
    079- <td>
    080- t_shopee_global_listing_sku
    081- </td>
    082- <td>
    083- None
    084- </td>
    085- <td>
    086- ALL
    087- </td>
    088- <td>
    089- None
    090- </td>
    091- <td>
    092- None
    093- </td>
    094- <td>
    095- None
    096- </td>
    097- <td>
    098- None
    099- </td>
    100- <td>
    101- 58821152
    102- </td>
    103- <td>
    104- 11.11
    105- </td>
    106- <td>
    107- Using where
    108- </td>
    109- </tr>
    110- </tbody>
    111- </table>
    112- <br />
    113- 额外建议:<br />
    114- 索引建议:<span style="color:FFA500;"><br />
    115- 建议添加索引:ALTER TABLE t_shopee_global_listing_sku ADD INDEX idx_update_time(update_time);</span><br />
    116- <br />
    117- 【t_shopee_global_listing_sku】表 【update_time】字段,索引分析:<br />
    118- +--------------+--------------+---------------+---------------+<br />
    119- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br />
    120- +==============+==============+===============+===============+<br />
    121- +--------------+--------------+---------------+---------------+<br />
    122- <br />
    123- <br />
    124- </replace(2025-12-10>
  6. 2025-12-18 17:56:19, 由 陈莉珍 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "chenlizhen",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "chenlizhen"。
    修改了 关闭日期,旧值为 "",新值为 "2025-12-18 17:56:19"。
所属项目 技术中心-需求池
所属模块 多平台   shopee
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P1
Bug状态 已关闭
业务部门 总经办
影响功能
开发责任人 陈祖帆
测试责任人 陈祖帆
解决时效 33.37
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2025-12-18 17:56:19
截止日期 0000-00-00
上线时间 2025-12-16 19:07:47
上线时效 33.37
操作系统
浏览器
关键词
抄送给 陈莉珍
所属迭代
相关需求
相关任务
由谁创建 陈莉珍 于 2025-12-15 09:45:30
影响环境 生产环境-业务反馈
由谁解决 陈祖帆 于 2025-12-16 19:07:47
解决版本
解决方案 配置问题
由谁关闭 陈莉珍 于 2025-12-18 17:56:19
最后修改 陈莉珍 于 2025-12-18 17:56:19
相关Bug