重现步骤
反馈人:王凯
数据库:zhcxkj_center_listing_comprehensive
查询时间:13.892
扫描行数:118551
发送行数:49.4533
指纹SQL: SELECT id , product_id , pf_listing_id , sku , source_sku , source_id , source_name , category_name , title , brand , attribute_color , attribute_height , attribute_length , attribute_weight , attribute_width , manufacturer , ean , color , discount_price_country , discount_price_currency , discount_price , language , normal_price_country , normal_price_currency , price , vate_rate , status , original_status , package_weight , lead_time , stock_status , stock_value , description , image , is_variant , create_by , create_time , update_by , update_time , is_deleted FROM ? WHERE ( source_id = ? AND product_id IN ( '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' ) AND status = ? AND is_deleted = ? ) ;
真实SQL:SELECT id,product_id,pf_listing_id,sku,source_sku,source_id,source_name,category_name,title,brand,attribute_color,attribute_height,attribute_length,attribute_weight,attribute_width,manufacturer,ean,color,discount_price_country,discount_price_currency,discount_price,language,normal_price_country,normal_price_currency,price,vate_rate,status,original_status,package_weight,lead_time,stock_status,stock_value,description,image,is_variant,create_by,create_time,update_by,update_time,is_deleted FROM t_listing_variant_fruugo WHERE (source_id = 27742 AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009') AND status = 3 AND is_deleted = 0);
##无人工修改##
AISQL修改建议:CREATE INDEX idx_fruugo_source_product_status ON t_listing_variant_fruugo(source_id, product_id, status, is_deleted);

SELECT id, product_id, pf_listing_id, sku, source_sku, source_id, source_name, category_name, title, brand, attribute_color, attribute_height, attribute_length, attribute_weight, attribute_width, manufacturer, ean, color, discount_price_country, discount_price_currency, discount_price, LANGUAGE, normal_price_country, normal_price_currency, price, vate_rate, status, original_status, package_weight, lead_time, stock_status, stock_value, description, image, is_variant, create_by, create_time, update_by, update_time, is_deleted
FROM t_listing_variant_fruugo
WHERE source_id = 27742
AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009')
AND status = 3
AND is_deleted = 0;
explain表:






id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t_listing_variant_fruugo None ref idx_source_id_source_sku,idx_source_id_sku_status,idx_source_create_time idx_source_create_time 10 const,const 221678 5 Using where

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

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

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

建议添加索引:ALTER TABLE t_listing_variant_fruugo ADD INDEX idx_product_id(product_id);


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


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

    已完成

  3. 2025-08-07 20:23:31, 由 陈莉珍 编辑。
    修改了 所属模块 ,旧值为 "0",新值为 "1927"。
    修改了 业务部门 ,旧值为 "0",新值为 "2"。
    修改了 开发责任人,旧值为 "",新值为 "caijunwei"。
    修改了 测试责任人,旧值为 "",新值为 "caijunwei"。
    修改了 解决时效 ,旧值为 "0",新值为 "74.61"。
    修改了 重现步骤 ,区别为:
    001- 反馈人:王凯
    001+ 反馈人:王凯 数据库:zhcxkj_center_listing_comprehensive 查询时间:13.892 扫描行数:118551 发送行数:49.4533 指纹SQL: SELECT id , product_id , pf_listing_id , sku , source_sku , source_id , source_name , category_name , title , brand , attribute_color , attribute_height , attribute_length , attribute_weight , attribute_width , manufacturer , ean , color , discount_price_country , discount_price_currency , discount_price , language , normal_price_country , normal_price_currency , price , vate_rate , status , original_status , package_weight , lead_time , stock_status , stock_value , description , image , is_variant , create_by , create_time , update_by , update_time , is_deleted FROM ? WHERE ( source_id = ? AND product_id IN ( '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' ) AND status = ? AND is_deleted = ? ) ; 真实SQL:SELECT id,product_id,pf_listing_id,sku,source_sku,source_id,source_name,category_name,title,brand,attribute_color,attribute_height,attribute_length,attribute_weight,attribute_width,manufacturer,ean,color,discount_price_country,discount_price_currency,discount_price,language,normal_price_country,normal_price_currency,price,vate_rate,status,original_status,package_weight,lead_time,stock_status,stock_value,description,image,is_variant,create_by,create_time,update_by,update_time,is_deleted FROM t_listing_variant_fruugo WHERE (source_id = 27742 AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009') AND status = 3 AND is_deleted = 0); ##无人工修改## AISQL修改建议:CREATE INDEX idx_fruugo_source_product_status ON t_listing_variant_fruugo(source_id, product_id, status, is_deleted); SELECT id, product_id, pf_listing_id, sku, source_sku, source_id, source_name, category_name, title, brand, attribute_color, attribute_height, attribute_length, attribute_weight, attribute_width, manufacturer, ean, color, discount_price_country, discount_price_currency, discount_price, LANGUAGE, normal_price_country, normal_price_currency, price, vate_rate, status, original_status, package_weight, lead_time, stock_status, stock_value, description, image, is_variant, create_by, create_time, update_by, update_time, is_deleted FROM t_listing_variant_fruugo WHERE source_id = 27742 AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009') AND status = 3 AND is_deleted = 0; explain表:id
    002- 数据库:zhcxkj_center_listing_comprehensive
    002+ select_type
    003- 查询时间:13.892
    003+ table
    004- 扫描行数:118551
    004+ partitions
    005- 发送行数:49.4533
    005+ type
    006- 指纹SQL: SELECT id , product_id , pf_listing_id , sku , source_sku , source_id , source_name , category_name , title , brand , attribute_color , attribute_height , attribute_length , attribute_weight , attribute_width , manufacturer , ean , color , discount_price_country , discount_price_currency , discount_price , language , normal_price_country , normal_price_currency , price , vate_rate , status , original_status , package_weight , lead_time , stock_status , stock_value , description , image , is_variant , create_by , create_time , update_by , update_time , is_deleted FROM ? WHERE ( source_id = ? AND product_id IN ( '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' ) AND status = ? AND is_deleted = ? ) ;
    006+ possible_keys
    007- 真实SQL:SELECT id,product_id,pf_listing_id,sku,source_sku,source_id,source_name,category_name,title,brand,attribute_color,attribute_height,attribute_length,attribute_weight,attribute_width,manufacturer,ean,color,discount_price_country,discount_price_currency,discount_price,language,normal_price_country,normal_price_currency,price,vate_rate,status,original_status,package_weight,lead_time,stock_status,stock_value,description,image,is_variant,create_by,create_time,update_by,update_time,is_deleted FROM t_listing_variant_fruugo WHERE (source_id = 27742 AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009') AND status = 3 AND is_deleted = 0);
    007+ key
    008- ##无人工修改##
    008+ key_len
    009- AISQL修改建议:CREATE INDEX idx_fruugo_source_product_status ON t_listing_variant_fruugo(source_id, product_id, status, is_deleted);
    009+ ref
    010-
    010+ rows
    011- SELECT id, product_id, pf_listing_id, sku, source_sku, source_id, source_name, category_name, title, brand, attribute_color, attribute_height, attribute_length, attribute_weight, attribute_width, manufacturer, ean, color, discount_price_country, discount_price_currency, discount_price, LANGUAGE, normal_price_country, normal_price_currency, price, vate_rate, status, original_status, package_weight, lead_time, stock_status, stock_value, description, image, is_variant, create_by, create_time, update_by, update_time, is_deleted
    011+ filtered
    012- FROM t_listing_variant_fruugo
    012+ Extra
    013- WHERE source_id = 27742
    013+ 1
    014- AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009')
    014+ SIMPLE
    015- AND status = 3
    015+ t_listing_variant_fruugo
    016- AND is_deleted = 0;
    016+ None
    017- explain表:
    017+ ref
    018-
    018+ idx_source_id_source_sku,idx_source_id_sku_status,idx_source_create_time
    019-
    019+ idx_source_create_time
    020-
    020+ 10
    021-
    021+ const,const
    022-
    022+ 221678
    023-
    023+ 5
    024-
    024+ Using where
    025-
    025+
    026-
    026+ 额外建议: 索引建议: 取出表 【t_listing_variant_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。 取出表 【t_listing_variant_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【82168】 条,没有必要为该字段创建索引。 取出表 【t_listing_variant_fruugo】 where条件字段 【is_deleted】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。 建议添加索引:ALTER TABLE t_listing_variant_fruugo ADD INDEX idx_product_id(product_id); 【t_listing_variant_fruugo】表 【product_id】字段,索引分析: +--------------+--------------+---------------+---------------+ | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY | +==============+==============+===============+===============+ +--------------+--------------+---------------+---------------+
    027-
    028- id
    029-
    030-
    031- select_type
    032-
    033-
    034- table
    035-
    036-
    037- partitions
    038-
    039-
    040- type
    041-
    042-
    043- possible_keys
    044-
    045-
    046- key
    047-
    048-
    049- key_len
    050-
    051-
    052- ref
    053-
    054-
    055- rows
    056-
    057-
    058- filtered
    059-
    060-
    061- Extra
    062-
    063-
    064-
    065-
    066-
    067-
    068- 1
    069-
    070-
    071- SIMPLE
    072-
    073-
    074- t_listing_variant_fruugo
    075-
    076-
    077- None
    078-
    079-
    080- ref
    081-
    082-
    083- idx_source_id_source_sku,idx_source_id_sku_status,idx_source_create_time
    084-
    085-
    086- idx_source_create_time
    087-
    088-
    089- 10
    090-
    091-
    092- const,const
    093-
    094-
    095- 221678
    096-
    097-
    098- 5
    099-
    100-
    101- Using where
    102-
    103-
    104-
    105-
    106-
    107- 额外建议:
    108- 索引建议:
    109- 取出表 【t_listing_variant_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。
    110-
    111- 取出表 【t_listing_variant_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【82168】 条,没有必要为该字段创建索引。
    112-
    113- 取出表 【t_listing_variant_fruugo】 where条件字段 【is_deleted】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。
    114-
    115- 建议添加索引:ALTER TABLE t_listing_variant_fruugo ADD INDEX idx_product_id(product_id);
    116-
    117- 【t_listing_variant_fruugo】表 【product_id】字段,索引分析:
    118- +--------------+--------------+---------------+---------------+
    119- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
    120- +==============+==============+===============+===============+
    121- +--------------+--------------+---------------+---------------+
    122-
    123-
    001- 反馈人:王凯<br />
    001+ 反馈人:王凯<br /> 数据库:zhcxkj_center_listing_comprehensive<br /> 查询时间:13.892<br /> 扫描行数:118551<br /> 发送行数:49.4533<br /> 指纹SQL: SELECT id , product_id , pf_listing_id , sku , source_sku , source_id , source_name , category_name , title , brand , attribute_color , attribute_height , attribute_length , attribute_weight , attribute_width , manufacturer , ean , color , discount_price_country , discount_price_currency , discount_price , language , normal_price_country , normal_price_currency , price , vate_rate , status , original_status , package_weight , lead_time , stock_status , stock_value , description , image , is_variant , create_by , create_time , update_by , update_time , is_deleted FROM ? WHERE ( source_id = ? AND product_id IN ( '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' ) AND status = ? AND is_deleted = ? ) ;<br /> 真实SQL:SELECT id,product_id,pf_listing_id,sku,source_sku,source_id,source_name,category_name,title,brand,attribute_color,attribute_height,attribute_length,attribute_weight,attribute_width,manufacturer,ean,color,discount_price_country,discount_price_currency,discount_price,language,normal_price_country,normal_price_currency,price,vate_rate,status,original_status,package_weight,lead_time,stock_status,stock_value,description,image,is_variant,create_by,create_time,update_by,update_time,is_deleted FROM t_listing_variant_fruugo WHERE (source_id = 27742 AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009') AND status = 3 AND is_deleted = 0);<br /> ##无人工修改##<br /> AISQL修改建议:CREATE INDEX idx_fruugo_source_product_status ON t_listing_variant_fruugo(source_id, product_id, status, is_deleted);<br /><br /> SELECT id, product_id, pf_listing_id, sku, source_sku, source_id, source_name, category_name, title, brand, attribute_color, attribute_height, attribute_length, attribute_weight, attribute_width, manufacturer, ean, color, discount_price_country, discount_price_currency, discount_price, LANGUAGE, normal_price_country, normal_price_currency, price, vate_rate, status, original_status, package_weight, lead_time, stock_status, stock_value, description, image, is_variant, create_by, create_time, update_by, update_time, is_deleted<br /> FROM t_listing_variant_fruugo<br /> WHERE source_id = 27742<br /> AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009')<br /> AND status = 3<br /> AND is_deleted = 0;<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- 查询时间:13.892<br />
    003+ <th>table</th>
    004- 扫描行数:118551<br />
    004+ <th>partitions</th>
    005- 发送行数:49.4533<br />
    005+ <th>type</th>
    006- 指纹SQL: SELECT id , product_id , pf_listing_id , sku , source_sku , source_id , source_name , category_name , title , brand , attribute_color , attribute_height , attribute_length , attribute_weight , attribute_width , manufacturer , ean , color , discount_price_country , discount_price_currency , discount_price , language , normal_price_country , normal_price_currency , price , vate_rate , status , original_status , package_weight , lead_time , stock_status , stock_value , description , image , is_variant , create_by , create_time , update_by , update_time , is_deleted FROM ? WHERE ( source_id = ? AND product_id IN ( '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' , '?' ) AND status = ? AND is_deleted = ? ) ;<br />
    006+ <th>possible_keys</th>
    007- 真实SQL:SELECT id,product_id,pf_listing_id,sku,source_sku,source_id,source_name,category_name,title,brand,attribute_color,attribute_height,attribute_length,attribute_weight,attribute_width,manufacturer,ean,color,discount_price_country,discount_price_currency,discount_price,language,normal_price_country,normal_price_currency,price,vate_rate,status,original_status,package_weight,lead_time,stock_status,stock_value,description,image,is_variant,create_by,create_time,update_by,update_time,is_deleted FROM t_listing_variant_fruugo WHERE (source_id = 27742 AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009') AND status = 3 AND is_deleted = 0);<br />
    007+ <th>key</th>
    008- ##无人工修改##<br />
    008+ <th>key_len</th>
    009- AISQL修改建议:CREATE INDEX idx_fruugo_source_product_status ON t_listing_variant_fruugo(source_id, product_id, status, is_deleted);<br />
    009+ <th>ref</th>
    010- <br />
    010+ <th>rows</th>
    011- SELECT id, product_id, pf_listing_id, sku, source_sku, source_id, source_name, category_name, title, brand, attribute_color, attribute_height, attribute_length, attribute_weight, attribute_width, manufacturer, ean, color, discount_price_country, discount_price_currency, discount_price, LANGUAGE, normal_price_country, normal_price_currency, price, vate_rate, status, original_status, package_weight, lead_time, stock_status, stock_value, description, image, is_variant, create_by, create_time, update_by, update_time, is_deleted<br />
    011+ <th>filtered</th>
    012- FROM t_listing_variant_fruugo<br />
    012+ <th>Extra</th>
    013- WHERE source_id = 27742<br />
    013+ </tr></tbody><tbody><tr><td>1</td>
    014- AND product_id IN ('FG2399047-1750182481382-002','FG7220151-1750188240486-015','FG2882796-1750165702614-012','FG6797832-1750166134725-013','FG9302245-1750183539069-003','FG8732239-1750182560598-012','FG9712349-1750183503580-017','FG8425970-1750182524893-019','FG6205034-1750165684465-002','FG6382426-1750187600926-011','FG8258780-1750182498680-001','FG2111255-1750187465828-002','FG5971546-1750165701389-016','FG4094002-1750182363255-007','FG9682937-1750165920399-014','FG6999919-1750182739902-004','FG6027715-1750182379597-007','FG8788536-1750187933673-010','FG6054194-1750187430735-013','FG7775082-1750182555730-008','FG7569159-1750182542110-011','FG3171324-1750166147509-007','FG9315563-1750188347859-011','FG8563153-1750182293317-006','FG8554515-1750182963776-008','FG6318433-1750193940150-008','FG4028991-1750187874445-006','FG3548311-1750187567663-013','FG6449697-1750182394528-013','FG7989495-1750187567663-012','FG6252149-1750187530896-005','FG9315687-1750182979768-007','FG3485398-1750165754555-012','FG3509247-1750165933313-009','FG9489308-1750182513513-013','FG4478361-1750165715111-004','FG3393607-1750187532902-008','FG4698784-1750165702614-005','FG9515401-1750182640270-002','FG4867744-1750182530307-013','FG4188836-1750182379597-004','FG9841862-1750182319801-003','FG8964811-1750194278286-004','FG8793618-1750165920399-003','FG7911342-1750182363255-013','FG5100162-1750187465828-005','FG7297571-1750182338169-014','FG8120077-1750165701389-010','FG8525555-1750188614738-016','FG9677456-1750182987924-009')<br />
    014+ <td>SIMPLE</td>
    015- AND status = 3<br />
    015+ <td>t_listing_variant_fruugo</td>
    016- AND is_deleted = 0;<br />
    016+ <td>None</td>
    017- explain表:<br />
    017+ <td>ref</td>
    018- <br />
    018+ <td>idx_source_id_source_sku,idx_source_id_sku_status,idx_source_create_time</td>
    019- <br />
    019+ <td>idx_source_create_time</td>
    020- <br />
    020+ <td>10</td>
    021- <br />
    021+ <td>const,const</td>
    022- <br />
    022+ <td>221678</td>
    023- <br />
    023+ <td>5</td>
    024- <table>
    024+ <td>Using where</td>
    025- <tbody>
    025+ </tr></tbody></table><br />
    026- <tr>
    026+ 额外建议:<br /> 索引建议:<br /> 取出表 【t_listing_variant_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。<br /><br /> 取出表 【t_listing_variant_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【82168】 条,没有必要为该字段创建索引。<br /><br /> 取出表 【t_listing_variant_fruugo】 where条件字段 【is_deleted】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。<br /><span style="color:#FFA500;"><br /> 建议添加索引:ALTER TABLE t_listing_variant_fruugo ADD INDEX idx_product_id(product_id);</span><br /><br /> 【t_listing_variant_fruugo】表 【product_id】字段,索引分析:<br /> +--------------+--------------+---------------+---------------+<br /> | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br /> +==============+==============+===============+===============+<br /> +--------------+--------------+---------------+---------------+<br /><br /><br />
    027- <th>
    028- id
    029- </th>
    030- <th>
    031- select_type
    032- </th>
    033- <th>
    034- table
    035- </th>
    036- <th>
    037- partitions
    038- </th>
    039- <th>
    040- type
    041- </th>
    042- <th>
    043- possible_keys
    044- </th>
    045- <th>
    046- key
    047- </th>
    048- <th>
    049- key_len
    050- </th>
    051- <th>
    052- ref
    053- </th>
    054- <th>
    055- rows
    056- </th>
    057- <th>
    058- filtered
    059- </th>
    060- <th>
    061- Extra
    062- </th>
    063- </tr>
    064- </tbody>
    065- <tbody>
    066- <tr>
    067- <td>
    068- 1
    069- </td>
    070- <td>
    071- SIMPLE
    072- </td>
    073- <td>
    074- t_listing_variant_fruugo
    075- </td>
    076- <td>
    077- None
    078- </td>
    079- <td>
    080- ref
    081- </td>
    082- <td>
    083- idx_source_id_source_sku,idx_source_id_sku_status,idx_source_create_time
    084- </td>
    085- <td>
    086- idx_source_create_time
    087- </td>
    088- <td>
    089- 10
    090- </td>
    091- <td>
    092- const,const
    093- </td>
    094- <td>
    095- 221678
    096- </td>
    097- <td>
    098- 5
    099- </td>
    100- <td>
    101- Using where
    102- </td>
    103- </tr>
    104- </tbody>
    105- </table>
    106- <br />
    107- 额外建议:<br />
    108- 索引建议:<br />
    109- 取出表 【t_listing_variant_fruugo】 where条件字段 【source_id】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。<br />
    110- <br />
    111- 取出表 【t_listing_variant_fruugo】 where条件字段 【status】 100000 条记录,重复的数据有:【82168】 条,没有必要为该字段创建索引。<br />
    112- <br />
    113- 取出表 【t_listing_variant_fruugo】 where条件字段 【is_deleted】 100000 条记录,重复的数据有:【100000】 条,没有必要为该字段创建索引。<br />
    114- <span style="color:#FFA500;"><br />
    115- 建议添加索引:ALTER TABLE t_listing_variant_fruugo ADD INDEX idx_product_id(product_id);</span><br />
    116- <br />
    117- 【t_listing_variant_fruugo】表 【product_id】字段,索引分析:<br />
    118- +--------------+--------------+---------------+---------------+<br />
    119- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br />
    120- +==============+==============+===============+===============+<br />
    121- +--------------+--------------+---------------+---------------+<br />
    122- <br />
    123- <br />
  4. 2025-08-07 20:23:35, 由 陈莉珍 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "chenlizhen",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "chenlizhen"。
    修改了 关闭日期,旧值为 "",新值为 "2025-08-07 20:23:35"。
所属项目 技术中心-需求池
所属模块 多平台   Fruugo
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P2
Bug状态 已关闭
业务部门 总经办
影响功能
开发责任人 蔡俊伟
测试责任人 蔡俊伟
解决时效 74.61
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2025-08-07 20:23:35
截止日期 0000-00-00
上线时间 2025-08-07 14:00:00
上线时效 74.7
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 陈莉珍 于 2025-08-04 11:17:43
影响环境 生产环境-业务反馈
由谁解决 蔡俊伟 于 2025-08-07 13:54:08
解决版本 主干
解决方案 性能问题
由谁关闭 陈莉珍 于 2025-08-07 20:23:35
最后修改 陈莉珍 于 2025-08-07 20:23:35
相关Bug