数据库:zhcxkj_center_listing_comprehensive
查询时间:427.414
执行次数: 44
扫描行数:10465000
发送行数:1393490
指纹SQL: select id , customer_id , source_id , source_name , source_sku , item_id , ship_node_id , ship_node_name , input_quantity , availtosell_quantity , is_deleted , create_time , create_by , update_by , update_time FROM ? where ( update_time < replace ( ? , ? , ? ) AND update_time >= DATE_SUB ( replace ( ? , ? , ? ) , INTERVAL ? MINUTE ) ) ;
真实SQL:select id,customer_id,source_id,source_name,source_sku,item_id,ship_node_id,ship_node_name,input_quantity,availtosell_quantity,is_deleted,create_time,create_by,update_by,update_time from t_walmart_quantity where (update_time= DATE_SUB(replace(2025-09-27 03:45:06,%, ),INTERVAL 30 MINUTE));
王凯,人工修改过
AISQL修改建议:SELECT id, customer_id, source_id, source_name, source_sku, item_id, ship_node_id, ship_node_name, input_quantity, availtosell_quantity, is_deleted, create_time, create_by, update_by, update_time
FROM t_walmart_quantity
WHERE update_time >= 2025-09-27 03:15:06 AND update_time < 2025-09-27 04:15:05;
explain表:
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | SIMPLE | t_walmart_quantity | None | range | idx_update_time | idx_update_time | 6 | None | 436 | 100 | Using index condition |
额外建议:
索引建议:扫描行数上千万,索引失效,sql 内勿使用 公式之类计算,代码处理好拼接成sql执行
(2025-09-27>