重现步骤

数据库:zhcxkj_center_listing_comprehensive
查询时间:10.7752
扫描行数:2068.45
发送行数:653.7
指纹SQL: select tal . id , tal . customer_id customerId , tal . source_id sourceId , tal . source_name sourceName , tal . pf_item_id pfItemId , tal . status status , tal . pf_item_id pfListingId , tal . currency_code currency , tal . first_publish_time publishTime , tal . title title , tal . pf_category_id pfCategoryId , tal . pf_category_path pfCategoryPath , tal . country country , tal . currency_code currencyCode , tal . offline_time offlineTime , tal . has_variant hasVariant , tal . has_market_picture hasMarketPicture , tal . pop_type popType , tal . pop_choice_change_time popChoiceChangeTime , tal . delivery_time deliveryTime , tal . main_image_url mainImageUrl , tal . business_admin_id businessAdminId , tal . business_admin_name businessAdminName , tal . handle_status handleStatus , tal . pf_gmt_modified_time pfGmtModifiedTime , tal . source_admin_id sourceAdminId , tal . source_admin_name sourceAdminName , tal . currency_code , tals . id listingSkuId , tals . listing_id listingId , tals . pf_source_sku pfSourceSku , tals . sku , tals . sale_price price , tals . pf_sku_id pfSkuId , tals . original_price originalPrice , tals . sale_price salePrice , tals . property_id propertyId , tals . pf_gross_weight pfGrossWeight , tals . pf_package_height pfPackageHeight , tals . pf_package_length pfPackageLength , tals . pf_package_width pfPackageWidth FROM ? tal inner join t_aliexpress_listing_sku tals on tal . id = tals . listing_id WHERE tals . sku IN ( ? , ? , ? , ? , ? ) ORDER BY tals . id ASC limit ? ;
真实SQL:select tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth from t_aliexpress_listing tal inner join t_aliexpress_listing_sku tals on tal.id = tals.listing_id WHERE tals.sku IN ( 17208004 , 17402179 , 17273469 , 17294796 , 1732164 ) ORDER BY tals.id ASC limit 1000;
无人工修改
AISQL修改建议: 优化后的SQL

SELECT tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth
FROM t_aliexpress_listing_sku tals
STRAIGHT_JOIN t_aliexpress_listing tal ON tal.id = tals.listing_id
WHERE tals.sku IN (17208004,17402179,17273469,17294796,1732164)
ORDER BY tals.id ASC
LIMIT 1000;
explain表:







id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE tals None range idx_sku,idx_listing_id idx_sku 259 None 1209 100 Using index condition; Using filesort
1 SIMPLE tal None eq_ref PRIMARY PRIMARY 8 zhcxkj_center_listing_comprehensive.tals.listing_id 1 100 None

额外建议:
索引建议:
建议添加索引:ALTER TABLE t_aliexpress_listing_sku ADD INDEX idx_sku_id(sku,id);


【t_aliexpress_listing_sku】表 【sku,id】字段,索引分析:
+--------------------------+---------------------+---------------+---------------+
| TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
+==========================+=====================+===============+===============+
| t_aliexpress_listing_sku | idx_listing_id | sku | 25297306 |
+--------------------------+---------------------+---------------+---------------+
| t_aliexpress_listing_sku | idx_sku | sku | 622476 |
+--------------------------+---------------------+---------------+---------------+
| t_aliexpress_listing_sku | idx_source_id_sku | sku | 14199740 |
+--------------------------+---------------------+---------------+---------------+
| t_aliexpress_listing_sku | idx_source_item_sku | sku | 24832022 |
+--------------------------+---------------------+---------------+---------------+
| t_aliexpress_listing_sku | PRIMARY | id | 25590718 |
+--------------------------+---------------------+---------------+---------------+

→ 【t_aliexpress_listing】 表,无需添加任何索引。


历史记录  
  1. 2025-08-08 09:49:20, 由 周杰 创建。
  2. 2025-08-08 09:53:41, 由 周杰 编辑。
    修改了 所属模块,旧值为 "0",新值为 "1872"。
    修改了 业务部门,旧值为 "0",新值为 "2"。
    修改了 解决时效,旧值为 "0",新值为 "-1"。
    修改了 重现步骤,区别为:
    001-
    001+ 数据库:zhcxkj_center_listing_comprehensive 查询时间:10.7752 扫描行数:2068.45 发送行数:653.7 指纹SQL: select tal . id , tal . customer_id customerId , tal . source_id sourceId , tal . source_name sourceName , tal . pf_item_id pfItemId , tal . status status , tal . pf_item_id pfListingId , tal . currency_code currency , tal . first_publish_time publishTime , tal . title title , tal . pf_category_id pfCategoryId , tal . pf_category_path pfCategoryPath , tal . country country , tal . currency_code currencyCode , tal . offline_time offlineTime , tal . has_variant hasVariant , tal . has_market_picture hasMarketPicture , tal . pop_type popType , tal . pop_choice_change_time popChoiceChangeTime , tal . delivery_time deliveryTime , tal . main_image_url mainImageUrl , tal . business_admin_id businessAdminId , tal . business_admin_name businessAdminName , tal . handle_status handleStatus , tal . pf_gmt_modified_time pfGmtModifiedTime , tal . source_admin_id sourceAdminId , tal . source_admin_name sourceAdminName , tal . currency_code , tals . id listingSkuId , tals . listing_id listingId , tals . pf_source_sku pfSourceSku , tals . sku , tals . sale_price price , tals . pf_sku_id pfSkuId , tals . original_price originalPrice , tals . sale_price salePrice , tals . property_id propertyId , tals . pf_gross_weight pfGrossWeight , tals . pf_package_height pfPackageHeight , tals . pf_package_length pfPackageLength , tals . pf_package_width pfPackageWidth FROM ? tal inner join t_aliexpress_listing_sku tals on tal . id = tals . listing_id WHERE tals . sku IN ( ? , ? , ? , ? , ? ) ORDER BY tals . id ASC limit ? ; 真实SQL:select tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth from t_aliexpress_listing tal inner join t_aliexpress_listing_sku tals on tal.id = tals.listing_id WHERE tals.sku IN ( 17208004 , 17402179 , 17273469 , 17294796 , 1732164 ) ORDER BY tals.id ASC limit 1000; 无人工修改 AISQL修改建议: 优化后的SQL SELECT tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth FROM t_aliexpress_listing_sku tals STRAIGHT_JOIN t_aliexpress_listing tal ON tal.id = tals.listing_id WHERE tals.sku IN (17208004,17402179,17273469,17294796,1732164) ORDER BY tals.id ASC LIMIT 1000; explain表:id
    002- 数据库:zhcxkj_center_listing_comprehensive
    002+ select_type
    003- 查询时间:10.7752
    003+ table
    004- 扫描行数:2068.45
    004+ partitions
    005- 发送行数:653.7
    005+ type
    006- 指纹SQL: select tal . id , tal . customer_id customerId , tal . source_id sourceId , tal . source_name sourceName , tal . pf_item_id pfItemId , tal . status status , tal . pf_item_id pfListingId , tal . currency_code currency , tal . first_publish_time publishTime , tal . title title , tal . pf_category_id pfCategoryId , tal . pf_category_path pfCategoryPath , tal . country country , tal . currency_code currencyCode , tal . offline_time offlineTime , tal . has_variant hasVariant , tal . has_market_picture hasMarketPicture , tal . pop_type popType , tal . pop_choice_change_time popChoiceChangeTime , tal . delivery_time deliveryTime , tal . main_image_url mainImageUrl , tal . business_admin_id businessAdminId , tal . business_admin_name businessAdminName , tal . handle_status handleStatus , tal . pf_gmt_modified_time pfGmtModifiedTime , tal . source_admin_id sourceAdminId , tal . source_admin_name sourceAdminName , tal . currency_code , tals . id listingSkuId , tals . listing_id listingId , tals . pf_source_sku pfSourceSku , tals . sku , tals . sale_price price , tals . pf_sku_id pfSkuId , tals . original_price originalPrice , tals . sale_price salePrice , tals . property_id propertyId , tals . pf_gross_weight pfGrossWeight , tals . pf_package_height pfPackageHeight , tals . pf_package_length pfPackageLength , tals . pf_package_width pfPackageWidth FROM ? tal inner join t_aliexpress_listing_sku tals on tal . id = tals . listing_id WHERE tals . sku IN ( ? , ? , ? , ? , ? ) ORDER BY tals . id ASC limit ? ;
    006+ possible_keys
    007- 真实SQL:select tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth from t_aliexpress_listing tal inner join t_aliexpress_listing_sku tals on tal.id = tals.listing_id WHERE tals.sku IN ( 17208004 , 17402179 , 17273469 , 17294796 , 1732164 ) ORDER BY tals.id ASC limit 1000;
    007+ key
    008- 无人工修改
    008+ key_len
    009- AISQL修改建议: 优化后的SQL
    009+ ref
    010-
    010+ rows
    011- SELECT tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth
    011+ filtered
    012- FROM t_aliexpress_listing_sku tals
    012+ Extra
    013- STRAIGHT_JOIN t_aliexpress_listing tal ON tal.id = tals.listing_id
    013+ 1
    014- WHERE tals.sku IN (17208004,17402179,17273469,17294796,1732164)
    014+ SIMPLE
    015- ORDER BY tals.id ASC
    015+ tals
    016- LIMIT 1000;
    016+ None
    017- explain表:
    017+ range
    018-
    018+ idx_sku,idx_listing_id
    019-
    019+ idx_sku
    020-
    020+ 259
    021-
    021+ None
    022-
    022+ 1209
    023-
    023+ 100
    024-
    024+ Using index condition; Using filesort
    025-
    025+ 1
    026-
    026+ SIMPLE
    027-
    027+ tal
    028-
    028+ None
    029- id
    029+ eq_ref
    030-
    030+ PRIMARY
    031-
    031+ PRIMARY
    032- select_type
    032+ 8
    033-
    033+ zhcxkj_center_listing_comprehensive.tals.listing_id
    034-
    034+ 1
    035- table
    035+ 100
    036-
    036+ None
    037-
    037+
    038- partitions
    038+ 额外建议: 索引建议: 建议添加索引:ALTER TABLE t_aliexpress_listing_sku ADD INDEX idx_sku_id(sku,id); 【t_aliexpress_listing_sku】表 【sku,id】字段,索引分析: +--------------------------+---------------------+---------------+---------------+ | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY | +==========================+=====================+===============+===============+ | t_aliexpress_listing_sku | idx_listing_id | sku | 25297306 | +--------------------------+---------------------+---------------+---------------+ | t_aliexpress_listing_sku | idx_sku | sku | 622476 | +--------------------------+---------------------+---------------+---------------+ | t_aliexpress_listing_sku | idx_source_id_sku | sku | 14199740 | +--------------------------+---------------------+---------------+---------------+ | t_aliexpress_listing_sku | idx_source_item_sku | sku | 24832022 | +--------------------------+---------------------+---------------+---------------+ | t_aliexpress_listing_sku | PRIMARY | id | 25590718 | +--------------------------+---------------------+---------------+---------------+→ 【t_aliexpress_listing】 表,无需添加任何索引。
    039-
    040-
    041- type
    042-
    043-
    044- possible_keys
    045-
    046-
    047- key
    048-
    049-
    050- key_len
    051-
    052-
    053- ref
    054-
    055-
    056- rows
    057-
    058-
    059- filtered
    060-
    061-
    062- Extra
    063-
    064-
    065-
    066-
    067-
    068-
    069- 1
    070-
    071-
    072- SIMPLE
    073-
    074-
    075- tals
    076-
    077-
    078- None
    079-
    080-
    081- range
    082-
    083-
    084- idx_sku,idx_listing_id
    085-
    086-
    087- idx_sku
    088-
    089-
    090- 259
    091-
    092-
    093- None
    094-
    095-
    096- 1209
    097-
    098-
    099- 100
    100-
    101-
    102- Using index condition; Using filesort
    103-
    104-
    105-
    106-
    107- 1
    108-
    109-
    110- SIMPLE
    111-
    112-
    113- tal
    114-
    115-
    116- None
    117-
    118-
    119- eq_ref
    120-
    121-
    122- PRIMARY
    123-
    124-
    125- PRIMARY
    126-
    127-
    128- 8
    129-
    130-
    131- zhcxkj_center_listing_comprehensive.tals.listing_id
    132-
    133-
    134- 1
    135-
    136-
    137- 100
    138-
    139-
    140- None
    141-
    142-
    143-
    144-
    145-
    146- 额外建议:
    147- 索引建议:
    148- 建议添加索引:ALTER TABLE t_aliexpress_listing_sku ADD INDEX idx_sku_id(sku,id);
    149-
    150- 【t_aliexpress_listing_sku】表 【sku,id】字段,索引分析:
    151- +--------------------------+---------------------+---------------+---------------+
    152- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
    153- +==========================+=====================+===============+===============+
    154- | t_aliexpress_listing_sku | idx_listing_id | sku | 25297306 |
    155- +--------------------------+---------------------+---------------+---------------+
    156- | t_aliexpress_listing_sku | idx_sku | sku | 622476 |
    157- +--------------------------+---------------------+---------------+---------------+
    158- | t_aliexpress_listing_sku | idx_source_id_sku | sku | 14199740 |
    159- +--------------------------+---------------------+---------------+---------------+
    160- | t_aliexpress_listing_sku | idx_source_item_sku | sku | 24832022 |
    161- +--------------------------+---------------------+---------------+---------------+
    162- | t_aliexpress_listing_sku | PRIMARY | id | 25590718 |
    163- +--------------------------+---------------------+---------------+---------------+
    164-
    165- → 【t_aliexpress_listing】 表,无需添加任何索引。
    166-
    167-
    001- <br />
    001+ <br /> 数据库:zhcxkj_center_listing_comprehensive<br /> 查询时间:10.7752<br /> 扫描行数:2068.45<br /> 发送行数:653.7<br /> 指纹SQL: select tal . id , tal . customer_id customerId , tal . source_id sourceId , tal . source_name sourceName , tal . pf_item_id pfItemId , tal . status status , tal . pf_item_id pfListingId , tal . currency_code currency , tal . first_publish_time publishTime , tal . title title , tal . pf_category_id pfCategoryId , tal . pf_category_path pfCategoryPath , tal . country country , tal . currency_code currencyCode , tal . offline_time offlineTime , tal . has_variant hasVariant , tal . has_market_picture hasMarketPicture , tal . pop_type popType , tal . pop_choice_change_time popChoiceChangeTime , tal . delivery_time deliveryTime , tal . main_image_url mainImageUrl , tal . business_admin_id businessAdminId , tal . business_admin_name businessAdminName , tal . handle_status handleStatus , tal . pf_gmt_modified_time pfGmtModifiedTime , tal . source_admin_id sourceAdminId , tal . source_admin_name sourceAdminName , tal . currency_code , tals . id listingSkuId , tals . listing_id listingId , tals . pf_source_sku pfSourceSku , tals . sku , tals . sale_price price , tals . pf_sku_id pfSkuId , tals . original_price originalPrice , tals . sale_price salePrice , tals . property_id propertyId , tals . pf_gross_weight pfGrossWeight , tals . pf_package_height pfPackageHeight , tals . pf_package_length pfPackageLength , tals . pf_package_width pfPackageWidth FROM ? tal inner join t_aliexpress_listing_sku tals on tal . id = tals . listing_id WHERE tals . sku IN ( ? , ? , ? , ? , ? ) ORDER BY tals . id ASC limit ? ;<br /> 真实SQL:select tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth from t_aliexpress_listing tal inner join t_aliexpress_listing_sku tals on tal.id = tals.listing_id WHERE tals.sku IN ( 17208004 , 17402179 , 17273469 , 17294796 , 1732164 ) ORDER BY tals.id ASC limit 1000;<br /> 无人工修改<br /> AISQL修改建议: 优化后的SQL<br /><br /> SELECT tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth <br /> FROM t_aliexpress_listing_sku tals <br /> STRAIGHT_JOIN t_aliexpress_listing tal ON tal.id = tals.listing_id <br /> WHERE tals.sku IN (17208004,17402179,17273469,17294796,1732164) <br /> ORDER BY tals.id ASC <br /> LIMIT 1000;<br /> explain表:<br /><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- 查询时间:10.7752<br />
    003+ <th>table</th>
    004- 扫描行数:2068.45<br />
    004+ <th>partitions</th>
    005- 发送行数:653.7<br />
    005+ <th>type</th>
    006- 指纹SQL: select tal . id , tal . customer_id customerId , tal . source_id sourceId , tal . source_name sourceName , tal . pf_item_id pfItemId , tal . status status , tal . pf_item_id pfListingId , tal . currency_code currency , tal . first_publish_time publishTime , tal . title title , tal . pf_category_id pfCategoryId , tal . pf_category_path pfCategoryPath , tal . country country , tal . currency_code currencyCode , tal . offline_time offlineTime , tal . has_variant hasVariant , tal . has_market_picture hasMarketPicture , tal . pop_type popType , tal . pop_choice_change_time popChoiceChangeTime , tal . delivery_time deliveryTime , tal . main_image_url mainImageUrl , tal . business_admin_id businessAdminId , tal . business_admin_name businessAdminName , tal . handle_status handleStatus , tal . pf_gmt_modified_time pfGmtModifiedTime , tal . source_admin_id sourceAdminId , tal . source_admin_name sourceAdminName , tal . currency_code , tals . id listingSkuId , tals . listing_id listingId , tals . pf_source_sku pfSourceSku , tals . sku , tals . sale_price price , tals . pf_sku_id pfSkuId , tals . original_price originalPrice , tals . sale_price salePrice , tals . property_id propertyId , tals . pf_gross_weight pfGrossWeight , tals . pf_package_height pfPackageHeight , tals . pf_package_length pfPackageLength , tals . pf_package_width pfPackageWidth FROM ? tal inner join t_aliexpress_listing_sku tals on tal . id = tals . listing_id WHERE tals . sku IN ( ? , ? , ? , ? , ? ) ORDER BY tals . id ASC limit ? ;<br />
    006+ <th>possible_keys</th>
    007- 真实SQL:select tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth from t_aliexpress_listing tal inner join t_aliexpress_listing_sku tals on tal.id = tals.listing_id WHERE tals.sku IN ( 17208004 , 17402179 , 17273469 , 17294796 , 1732164 ) ORDER BY tals.id ASC limit 1000;<br />
    007+ <th>key</th>
    008- 无人工修改<br />
    008+ <th>key_len</th>
    009- AISQL修改建议: 优化后的SQL<br />
    009+ <th>ref</th>
    010- <br />
    010+ <th>rows</th>
    011- SELECT tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth <br />
    011+ <th>filtered</th>
    012- FROM t_aliexpress_listing_sku tals <br />
    012+ <th>Extra</th>
    013- STRAIGHT_JOIN t_aliexpress_listing tal ON tal.id = tals.listing_id <br />
    013+ </tr></tbody><tbody><tr><td>1</td>
    014- WHERE tals.sku IN (17208004,17402179,17273469,17294796,1732164) <br />
    014+ <td>SIMPLE</td>
    015- ORDER BY tals.id ASC <br />
    015+ <td>tals</td>
    016- LIMIT 1000;<br />
    016+ <td>None</td>
    017- explain表:<br />
    017+ <td>range</td>
    018- <br />
    018+ <td>idx_sku,idx_listing_id</td>
    019- <br />
    019+ <td>idx_sku</td>
    020- <br />
    020+ <td>259</td>
    021- <br />
    021+ <td>None</td>
    022- <br />
    022+ <td>1209</td>
    023- <br />
    023+ <td>100</td>
    024- <br />
    024+ <td>Using index condition; Using filesort</td>
    025- <table>
    025+ </tr><tr><td>1</td>
    026- <tbody>
    026+ <td>SIMPLE</td>
    027- <tr>
    027+ <td>tal</td>
    028- <th>
    028+ <td>None</td>
    029- id
    029+ <td>eq_ref</td>
    030- </th>
    030+ <td>PRIMARY</td>
    031- <th>
    031+ <td>PRIMARY</td>
    032- select_type
    032+ <td>8</td>
    033- </th>
    033+ <td>zhcxkj_center_listing_comprehensive.tals.listing_id</td>
    034- <th>
    034+ <td>1</td>
    035- table
    035+ <td>100</td>
    036- </th>
    036+ <td>None</td>
    037- <th>
    037+ </tr></tbody></table><br />
    038- partitions
    038+ 额外建议:<br /> 索引建议:<span style="color:#FFA500;"><br /> 建议添加索引:ALTER TABLE t_aliexpress_listing_sku ADD INDEX idx_sku_id(sku,id);</span><br /><br /> 【t_aliexpress_listing_sku】表 【sku,id】字段,索引分析:<br /> +--------------------------+---------------------+---------------+---------------+<br /> | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br /> +==========================+=====================+===============+===============+<br /> | t_aliexpress_listing_sku | idx_listing_id | sku | 25297306 |<br /> +--------------------------+---------------------+---------------+---------------+<br /> | t_aliexpress_listing_sku | idx_sku | sku | 622476 |<br /> +--------------------------+---------------------+---------------+---------------+<br /> | t_aliexpress_listing_sku | idx_source_id_sku | sku | 14199740 |<br /> +--------------------------+---------------------+---------------+---------------+<br /> | t_aliexpress_listing_sku | idx_source_item_sku | sku | 24832022 |<br /> +--------------------------+---------------------+---------------+---------------+<br /> | t_aliexpress_listing_sku | PRIMARY | id | 25590718 |<br /> +--------------------------+---------------------+---------------+---------------+<br /><br /><span style="color:#008000;font-weight:bold;">→ 【t_aliexpress_listing】 表,无需添加任何索引。</span><br /><br /><br />
    039- </th>
    040- <th>
    041- type
    042- </th>
    043- <th>
    044- possible_keys
    045- </th>
    046- <th>
    047- key
    048- </th>
    049- <th>
    050- key_len
    051- </th>
    052- <th>
    053- ref
    054- </th>
    055- <th>
    056- rows
    057- </th>
    058- <th>
    059- filtered
    060- </th>
    061- <th>
    062- Extra
    063- </th>
    064- </tr>
    065- </tbody>
    066- <tbody>
    067- <tr>
    068- <td>
    069- 1
    070- </td>
    071- <td>
    072- SIMPLE
    073- </td>
    074- <td>
    075- tals
    076- </td>
    077- <td>
    078- None
    079- </td>
    080- <td>
    081- range
    082- </td>
    083- <td>
    084- idx_sku,idx_listing_id
    085- </td>
    086- <td>
    087- idx_sku
    088- </td>
    089- <td>
    090- 259
    091- </td>
    092- <td>
    093- None
    094- </td>
    095- <td>
    096- 1209
    097- </td>
    098- <td>
    099- 100
    100- </td>
    101- <td>
    102- Using index condition; Using filesort
    103- </td>
    104- </tr>
    105- <tr>
    106- <td>
    107- 1
    108- </td>
    109- <td>
    110- SIMPLE
    111- </td>
    112- <td>
    113- tal
    114- </td>
    115- <td>
    116- None
    117- </td>
    118- <td>
    119- eq_ref
    120- </td>
    121- <td>
    122- PRIMARY
    123- </td>
    124- <td>
    125- PRIMARY
    126- </td>
    127- <td>
    128- 8
    129- </td>
    130- <td>
    131- zhcxkj_center_listing_comprehensive.tals.listing_id
    132- </td>
    133- <td>
    134- 1
    135- </td>
    136- <td>
    137- 100
    138- </td>
    139- <td>
    140- None
    141- </td>
    142- </tr>
    143- </tbody>
    144- </table>
    145- <br />
    146- 额外建议:<br />
    147- 索引建议:<span style="color:FFA500;"><br />
    148- 建议添加索引:ALTER TABLE t_aliexpress_listing_sku ADD INDEX idx_sku_id(sku,id);</span><br />
    149- <br />
    150- 【t_aliexpress_listing_sku】表 【sku,id】字段,索引分析:<br />
    151- +--------------------------+---------------------+---------------+---------------+<br />
    152- | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |<br />
    153- +==========================+=====================+===============+===============+<br />
    154- | t_aliexpress_listing_sku | idx_listing_id | sku | 25297306 |<br />
    155- +--------------------------+---------------------+---------------+---------------+<br />
    156- | t_aliexpress_listing_sku | idx_sku | sku | 622476 |<br />
    157- +--------------------------+---------------------+---------------+---------------+<br />
    158- | t_aliexpress_listing_sku | idx_source_id_sku | sku | 14199740 |<br />
    159- +--------------------------+---------------------+---------------+---------------+<br />
    160- | t_aliexpress_listing_sku | idx_source_item_sku | sku | 24832022 |<br />
    161- +--------------------------+---------------------+---------------+---------------+<br />
    162- | t_aliexpress_listing_sku | PRIMARY | id | 25590718 |<br />
    163- +--------------------------+---------------------+---------------+---------------+<br />
    164- <br />
    165- <span style="color:green;font-weight:bold;">→ 【t_aliexpress_listing】 表,无需添加任何索引。</span><br />
    166- <br />
    167- <br />

    数据库:zhcxkj_center_datasync_comprehensive
    查询时间:13.5868
    扫描行数:27875.9
    发送行数:1
    指纹SQL: select count ( * ) FROM ? where customer_id = ? and source_id = ? and type = ? and status in ( ? , ? ) ;
    真实SQL:select count(*) from t_shopee_listing_pull_queue where customer_id = 1 and source_id = 13738 and type = 0 and status in ( 0 , 1 );
    无人工修改
    AISQL修改建议:ALTER TABLE t_shopee_listing_pull_queue ADD INDEX idx_optimize (customer_id, source_id, type, status);
    SELECT count(*)
    FROM t_shopee_listing_pull_queue
    WHERE customer_id = 1
    AND source_id = 13738
    AND type = 0
    AND status IN (0,1);
    explain表:






    id select_type table partitions type possible_keys key key_len ref rows filtered Extra
    1 SIMPLE t_shopee_listing_pull_queue None range idx_status,idx_source_id idx_status 1 None 391 0.01 Using index condition; Using where

    额外建议:
    索引建议:
  3. 2025-08-08 09:54:27, 由 周杰 添加备注。

    数据库:zhcxkj_center_listing_comprehensive
    查询时间:11.0422
    扫描行数:1089.25
    发送行数:1063.54
    指纹SQL: SELECT id , customer_id , source_id , parent_sku , sku , customer_sku , offer_id , source_sku , category_id , name , real_product_id , status , price , currency , publish_time , creator_by , create_time , update_by , update_time , market_create_time , market_update_time , main_image , quantity , product_quantity , is_deleted , variant_id , variant_name , category_name , handle_status , stock , un_publish_time , source_name , has_variant , country , category_name_path , price_cz , currency_cz , status_cz , listing_person , salesman_id , salesman , is_update , delivery_handling_time , price_sk , currency_sk , status_sk , watchers_count , watchers_conversion_rate , visits_count , amazon_path_name_en , amazon_category_id , other_path_name_en , deal_status , operator , operate_time , ean , day_thirty_sales , day_sixty_sales , day_ninety_sales , total_sales , thirty_sales_conversion_rate , rule_price_sync FROM ? WHERE ( source_id = ? AND sku IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,
    真实SQL:SELECT id,customer_id,source_id,parent_sku,sku,customer_sku,offer_id,source_sku,category_id,name,real_product_id,status,price,currency,publish_time,creator_by,create_time,update_by,update_time,market_create_time,market_update_time,main_image,quantity,product_quantity,is_deleted,variant_id,variant_name,category_name,handle_status,stock,un_publish_time,source_name,has_variant,country,category_name_path,price_cz,currency_cz,status_cz,listing_person,salesman_id,salesman,is_update,delivery_handling_time,price_sk,currency_sk,status_sk,watchers_count,watchers_conversion_rate,visits_count,amazon_path_name_en,amazon_category_id,other_path_name_en,deal_status,operator,operate_time,ean,day_thirty_sales,day_sixty_sales,day_ninety_sales,total_sales,thirty_sales_conversion_rate,rule_price_sync FROM t_allegro_listing_5 WHERE (source_id = 23620 AND sku IN (10013384,10276449,10279269,10280408,10280417,10294067,10297266,10297829,10297852,10297869,10297874,10297875,10320983,10392247,10392378,10544192,10582269,10633590,10842193,10854723,10889676,10891238,10906419,10906831,11024676,11115925,11132897,11160292,11342498,11364515,11392466,11476470,11487694,11562501,11566012,11650554,11681261,11681520,11754604,11762993,11796546,11860534,11868216,11882498,11912855,11977242,11998857,11998988,12079111,12498974,12838654,13030026,13033142,13069926,13087934,13088061,13088882,13088910,13107513,13147902,13262671,13263733,13263939,13311147,13311915,13325274,13354589,13463027,13466850,13466853,13468171,13494359,13496942,13498384,13498525,13499770,13512288,13512570,13528966,13529349,13534166,13547550,13565371,13567140,13595908,13601314,13613455,13620380,13746467,13776738,13928569,13953641,13970587,13977833,13978291,13990288,13994641,13994811,14015756,14015757,14016789,14019135,14032957,14099888,14115541,14123723,14149557,14155112,14158102,14175151,14175220,14175221,14273470,14277379,14285707,14285744,14285746,14305956,14310669,14330940,14331040,14331849,14331878,14343047,14353173,14353252,14362332,14362419,14362420,14367560,14367594,14368883,14369507,14370776,14370810,14371260,14402316,14405200,14407721,14413600,14479193,14494116,14494178,14511036,14524433,14559608,14586175,14592907,14593040,14593057,14603492,14604872,14636114,14636240,14646858,14709842,14737751,14740901,14751084,14770286,14770444,14771213,14851041,14958236,14995206,15046235,15118817,15118818,15120257,15127342,15132369,15216996,15304450,15324341,15469382,15491567,15506429,15572677,15600395,15615336,15615879,15638728,15638832,15649058,15649123,15649124,15740400,15836041,15856077,15862345,15863057,15880202,15880242,15956243,15963262,16010365,16038439,16050206,16077877,16095383,16149562,16161681,16170181,16171221,16171320,16171343,16175214,16202544,16205590,16207014,16207059,16209854,16210251,16215489,16216633,16216807,16216995,16222926,1623684,16250938,16251024,16263391,16271428,16278140,16317835,16337395,16344406,16359488,16360290,16376913,16457749,16458092,16458161,16458250,16465860,16465914,1647817,1647823,16529432,16529470,16533629,16556264,16559996,16560173,16560299,16560385,16560810,16581987,16610420,16610765,16623612,16630648,16701527,16724854,16734833,16734989,16735128,16735699,16747801,16754026,16758219,16758230,16781848,16787709,16787874,16871653,16883808,16885232,16909351,16909366,16913421,16916569,16922361,16923183,16928658,16930340,16937703,16939197,16939292,16947260,16949868,16954005,16962898,16964504,17020262,17020288,17024420,17024447,17024460,17025122,17025522,17025602,17036222,17039243,17043547,17043912,17048373,17048422,17048448,17048467,17053740,17055201,17055328,17057559,17060319,17064344,17070302,17070378,17070468,17070496,17071520,17071897,17074176,17077930,17077938,17079267,17080293,17088893,17089001,17089577,17090195,17099104,17104243,17104377,17104417,17105774,17128853,17128929,17129656,17134445,17134606,17134637,17135887,17137823,17139030,17142986,17152908,17153150,17153155,17153382,17155956,17158463,17159228,17159578,17166299,17166355,17168502,17174417,17175438,17175447,17175806,17178477,17180646,17180913,17181145,17181970,17181972,17184309,17185322,17186280,17188436,17188562,17189371,17189376,17190551,17192097,17192164,17192249,17196787,17196888,17197183,17197460,17206572,17216012,17216114,17216686,17216987,17218508,17219962,17220182,17221804,17229791,17230411,17230504,17232155,17235354,17236245,17237089,17237388,17237496,17238483,17239001,17245246,17251214,17251333,17251365,17251382,17252987,17253024,17253058,17253251,17253333,17253645,17259512,17259569,17265097,17265176,17265508,17267214,17267930,17271174,17272819,17274531,17277447,17277596,17277675,17292151,17292280,17293775,17293790,17293840,17299927,17311251,17313646,17313996,17323713,17325424,17330130,17336413,17337363,17338929,17340584,17343971,17355257,17355397,17355589,17355804,17361946,17367410,17373465,17382374,17382599,17382706,17382836,17383229,17383275,17390240,17392240,17392268,17398137,17398991,17400481,17400583,17405425,17407777,17409813,17409932,17411340,17419381,17420729,17422523,17426821,17,17749131,17761046,17761893,17770255,17771981,17772435,17776024,17777218,17796263,17796322,17802351,17802400,17806168,17807214,17807311,17835451,17835532,17860584,17870086,17875863,17879680,17887341,17892019,17892102,17892119,17893541,17900021,17905028,17905087,17905737,17906163,17908752,17917825,17918571,17918600,17924962,17925056,17925110,17930360,17931307,17931590,17937029,17948273,17952672,17952728,17952729,17952730,17952731,17954579,17966153,17975367,17975462,17976493,17976998,17978263,17981042,17982102,17983772,17985155,17988714,17988764,17988884,17992758,17992774,17995803,18008487,18014056,18016415,18016416,18018490,18026667,18030383,18032488,18035475,18042319,18049726,18049754,18049783,18056180,18059085,18066249,18072132,18072133,18072134,18075003,18075027,18080045,18080242,18081612,18084543,18084544,18085349,18101908,18110222,18127087,18140735,18415992,18513786,18519624,18522816,18543576,18558738,18560064,18567502,18568075,18569512,18569521,18574291,18574388,18578988,18590183,18590234,18593897,18593971,18597145,18597541,18598057,18598644,18601623,18601729,18601800,18603140,18606833,18606920,18607433,18607704,18610895,18616657,18616722,18616763,18619966,18622353,18632507,18639790,18665398,18665631,18666963,18667009,18667057,18668574,18668636,18681062,18687786,18701204,18701896,18701952,18701962,18702032,18702061,18703495,18703540,18714678,18714969,18727122,18727333,18728573,18740995,18740998,18741025,18742537,18745300,18745519,18746267,18746352,18746474,18746562,18766524,18766569,18780195,18793170,18798878,18799155,18799728,18805780,18820078,18827464,18836849,18840726,18844388,18848316,18849385,18856122,18856125,18865749,18865834,18865865,18875221,18875300,18890647,18891216,18898476,18928113,18931374,18931665,18933502,18939383,18954904,18957928,18964749,18966203,18966204,18981324,18983721,18983722,18990512,18997226,18997250,19001074,19001121,19001210,19001270,19001273,19001434,19007160,19008423,19009722,19011053,19014374,19014491,19014534,19029861,19034462,19042321,19043000,19046561,19048318,19065726,19065999,19068673,19074116,19082228,19083600,19087931,19088015,19104789,19118782,19118992,19120520,19126065,19127224,19129126,19135916,19137379,19144974,19145965,19150412,19156587,19157840,19158420,19160251,19161670,19166072,19166641,19167709,19168285,19169208,19169781,19224738,19225094,19225139,19225216,19225227,19225235,19225243,19225252,19226588,19231777,19239175,19245310,19251091,19251170,19251436,19251505,19251612,19253612,19257110,19289730,19300805,19303420,19306810,19313332,19329611,19330613,19353942,19357752,19357790,19357802,19357814,19359004,19360737,19361052,19361684,19365095,19365532,19366937,19380409,19380596,19381133,19389206,19404018,19404135,19404189,19417434,19417768,19425093,19426715,19426848,19426916,19427523,19428053,19432117,19432182,19436483,19436502,19440564,19441762,19447143,19447290,19455704,19457011,19462016,19462806,19463154,19469946,19470324,19470459,19471348,19476664,19476680,19477065,19485571,19489185,19489229,19490022,19493111,19495446,19495514,19497427,19499542,19499689,19503827,19514976,19515535,19520875,19526671,19526679,19530882,19532119,19532442,19532446,19539167,19542352,19545291,19545606,19545768,19551620,19555463,19555564,19556301,19557291,19564225,19564570,19569430,19577994,19582769,19585237,19586402,19586486,19596381,19596425,19596740,19597259,19597685,19602213,19602769,19602927,19603235,19603247,19603268,19604586,19604620,19608017,19612384,19619731,19620004,19620471,19626681,19627539,19637905,19637911,196389...;
    王凯,人工修改过
    AISQL修改建议:in数量过多导致索引失效,请 拆分业务控制in 数量100个内 ;或者 in 条件转换成临时表,使用 临时 表 join 的方式 提高查询性能,但该方式 磁盘io 消耗较大,导致io卡死,不适合高并发执行的场景。
    explain表:
    额外建议:
    索引建议:
  4. 2025-08-08 09:55:22, 由 周杰 添加备注。

    数据库:zhcxkj_center_listing_comprehensive
    查询时间:10.6044
    扫描行数:1908.32
    发送行数:624.881
    指纹SQL: select tal . id , tal . customer_id customerId , tal . source_id sourceId , tal . source_name sourceName , tal . pf_item_id pfItemId , tal . status status , tal . pf_item_id pfListingId , tal . currency_code currency , tal . first_publish_time publishTime , tal . title title , tal . pf_category_id pfCategoryId , tal . pf_category_path pfCategoryPath , tal . country country , tal . currency_code currencyCode , tal . offline_time offlineTime , tal . has_variant hasVariant , tal . has_market_picture hasMarketPicture , tal . pop_type popType , tal . pop_choice_change_time popChoiceChangeTime , tal . delivery_time deliveryTime , tal . main_image_url mainImageUrl , tal . business_admin_id businessAdminId , tal . business_admin_name businessAdminName , tal . handle_status handleStatus , tal . pf_gmt_modified_time pfGmtModifiedTime , tal . source_admin_id sourceAdminId , tal . source_admin_name sourceAdminName , tal . currency_code , tals . id listingSkuId , tals . listing_id listingId , tals . pf_source_sku pfSourceSku , tals . sku , tals . sale_price price , tals . pf_sku_id pfSkuId , tals . original_price originalPrice , tals . sale_price salePrice , tals . property_id propertyId , tals . pf_gross_weight pfGrossWeight , tals . pf_package_height pfPackageHeight , tals . pf_package_length pfPackageLength , tals . pf_package_width pfPackageWidth FROM ? tal inner join t_aliexpress_listing_sku tals on tal . id = tals . listing_id WHERE tals . sku IN ( ? , ? , ? , ? ) ORDER BY tals . id ASC limit ? ;
    真实SQL:select tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName, tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId, tal.currency_code currency, tal.first_publish_time publishTime, tal.title title, tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country, tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant, tal.has_market_picture hasMarketPicture, tal.pop_type popType, tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime, tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId, tal.business_admin_name businessAdminName, tal.handle_status handleStatus, tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId, tal.source_admin_name sourceAdminName, tal.currency_code, tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku, tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice, tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight, tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength, tals.pf_package_width pfPackageWidth from t_aliexpress_listing tal inner join t_aliexpress_listing_sku tals on tal.id = tals.listing_id WHERE tals.sku IN ( 16794939 , 16911798 , 16908057 , 16759271 ) ORDER BY tals.id ASC limit 1000;
    无人工修改
    AISQL修改建议: 优化后的SQL语句


    SELECT tal.id, tal.customer_id customerId, tal.source_id sourceId, tal.source_name sourceName,
    tal.pf_item_id pfItemId, tal.status status, tal.pf_item_id pfListingId,
    tal.currency_code currency, tal.first_publish_time publishTime, tal.title title,
    tal.pf_category_id pfCategoryId, tal.pf_category_path pfCategoryPath, tal.country country,
    tal.currency_code currencyCode, tal.offline_time offlineTime, tal.has_variant hasVariant,
    tal.has_market_picture hasMarketPicture, tal.pop_type popType,
    tal.pop_choice_change_time popChoiceChangeTime, tal.delivery_time deliveryTime,
    tal.main_image_url mainImageUrl, tal.business_admin_id businessAdminId,
    tal.business_admin_name businessAdminName, tal.handle_status handleStatus,
    tal.pf_gmt_modified_time pfGmtModifiedTime, tal.source_admin_id sourceAdminId,
    tal.source_admin_name sourceAdminName, tal.currency_code,
    tals.id listingSkuId, tals.listing_id listingId, tals.pf_source_sku pfSourceSku,
    tals.sku, tals.sale_price price, tals.pf_sku_id pfSkuId, tals.original_price originalPrice,
    tals.sale_price salePrice, tals.property_id propertyId, tals.pf_gross_weight pfGrossWeight,
    tals.pf_package_height pfPackageHeight, tals.pf_package_length pfPackageLength,
    tals.pf_package_width pfPackageWidth
    FROM t_aliexpress_listing_sku tals
    FORCE INDEX (idx_sku)
    INNER JOIN t_aliexpress_listing tal ON tal.id = tals.listing_id
    WHERE tals.sku IN (16794939, 16911798, 16908057, 16759271)
    ORDER BY tals.id ASC
    LIMIT 1000;


    优化说明:
    1. 调整了JOIN顺序,优先从sku表(t_aliexpress_listing_sku)开始,因为WHERE条件在该表上
    2. 使用了FORCE INDEX提示强制使用sku字段上的索引(假设存在名为idx_sku的索引)
    3. 如果t_aliexpress_listing_sku表的sku字段没有索引,建议创建:CREATE INDEX idx_sku ON t_aliexpress_listing_sku(sku)
    explain表:







    id select_type table partitions type possible_keys key key_len ref rows filtered Extra
    1 SIMPLE tals None range idx_sku,idx_listing_id idx_sku 259 None 1128 100 Using index condition; Using filesort
    1 SIMPLE tal None eq_ref PRIMARY PRIMARY 8 zhcxkj_center_listing_comprehensive.tals.listing_id 1 100 None

    额外建议:
    索引建议:
    建议添加索引:ALTER TABLE t_aliexpress_listing_sku ADD INDEX idx_sku_id(sku,id);


    【t_aliexpress_listing_sku】表 【sku,id】字段,索引分析:
    +--------------------------+---------------------+---------------+---------------+
    | TABLE_NAME | INDEX_NAME | COLUMN_NAME | CARDINALITY |
    +==========================+=====================+===============+===============+
    | t_aliexpress_listing_sku | idx_listing_id | sku | 25297306 |
    +--------------------------+---------------------+---------------+---------------+
    | t_aliexpress_listing_sku | idx_sku | sku | 622476 |
    +--------------------------+---------------------+---------------+---------------+
    | t_aliexpress_listing_sku | idx_source_id_sku | sku | 14199740 |
    +--------------------------+---------------------+---------------+---------------+
    | t_aliexpress_listing_sku | idx_source_item_sku | sku | 24832022 |
    +--------------------------+---------------------+---------------+---------------+
    | t_aliexpress_listing_sku | PRIMARY | id | 25590718 |
    +--------------------------+---------------------+---------------+---------------+

    → 【t_aliexpress_listing】 表,无需添加任何索引。

  5. 2025-08-08 10:12:44, 由 任芳涛 指派给 陈聪。
    修改了 指派给,旧值为 "renfangtao",新值为 "chencong"。
  6. 2025-08-08 10:35:26, 由 陈聪 确认Bug。
    修改了 Bug类型 ,旧值为 "",新值为 "feibug"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    服务器资源问题 业务增长太快数据量太大
  7. 2025-08-08 10:35:38, 由 陈聪 解决,方案为 非BUG-纯属误判 。
    修改了 解决方案,旧值为 "",新值为 "feibug"。
    修改了 解决日期,旧值为 "",新值为 "2025-08-08 10:35:33"。
    修改了 指派给 ,旧值为 "chencong",新值为 "zhoujie"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 解决者 ,旧值为 "",新值为 "chencong"。
  8. 2025-08-08 18:24:47, 由 周杰 激活。
    修改了 指派给 ,旧值为 "zhoujie",新值为 "chencong"。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "active"。
    修改了 激活日期,旧值为 "",新值为 "2025-08-08 18:24:47"。
    修改了 激活次数,旧值为 "0",新值为 "1"。
    修改了 解决方案,旧值为 "feibug",新值为 ""。
    修改了 解决日期,旧值为 "2025-08-08 10:35:33",新值为 "0000-00-00"。
    修改了 解决者 ,旧值为 "chencong",新值为 ""。
    修改了 关闭日期,旧值为 "",新值为 "0000-00-00"。
  9. 2025-08-08 18:28:47, 由 陈聪 指派给 任芳涛。
    修改了 指派给,旧值为 "chencong",新值为 "renfangtao"。
    转需求吧
  10. 2025-08-08 18:42:46, 由 任芳涛 解决,方案为 历史bug(180天以上) 。
    修改了 解决方案,旧值为 "",新值为 "history"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2025-08-08 18:42:19"。
    修改了 指派给 ,旧值为 "renfangtao",新值为 "zhoujie"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 解决者 ,旧值为 "",新值为 "renfangtao"。
    历史bug已处理周一上线
  11. 2025-08-08 18:43:57, 由 周杰 编辑。
    修改了 开发责任人,旧值为 "",新值为 "wangqian"。
    修改了 测试责任人,旧值为 "",新值为 "wangqian"。
    修改了 解决时效 ,旧值为 "0",新值为 "8.88"。
    修改了 上线时间 ,旧值为 "0000-00-00 00:00:00",新值为 "2025-08-08 18:43"。
    修改了 上线时效 ,旧值为 "-1",新值为 "8.89"。
  12. 2025-08-08 19:18:41, 由 周杰 指派给 任芳涛。
    修改了 指派给,旧值为 "zhoujie",新值为 "renfangtao"。
    先挂你那里 周一上线后验证没问题再指派回来
  13. 2025-08-11 13:51:21, 由 任芳涛 指派给 周杰。
    修改了 指派给,旧值为 "renfangtao",新值为 "zhoujie"。
  14. 2025-08-11 13:53:15, 由 周杰 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "zhoujie",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "zhoujie"。
    修改了 关闭日期,旧值为 "",新值为 "2025-08-11 13:53:15"。
所属项目 技术中心-需求池
所属模块 多平台   walmart
所属计划
所属迭代
Bug类型 非BUG-纯属误判
严重程度 一般
优先级 P2
Bug状态 已关闭
业务部门 总经办
影响功能
开发责任人 王谦
测试责任人 王谦
解决时效 8.88
激活次数 1
激活日期 2025-08-08 18:24:47
是否确认 是
当前指派 Closed 于 2025-08-11 13:53:15
截止日期 0000-00-00
上线时间 2025-08-08 18:43:00
上线时效 8.89
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 周杰 于 2025-08-08 09:49:20
影响环境 生产环境-业务反馈
由谁解决 任芳涛 于 2025-08-08 18:42:19
解决版本 主干
解决方案 历史bug(180天以上)
由谁关闭 周杰 于 2025-08-11 13:53:15
最后修改 周杰 于 2025-08-11 13:53:15
相关Bug