重现步骤
select `Id`,`CustomerId`,`OrderSourceId`,`ProductId`,`SubProductId`,`MainImage`,`SellerSku`,`Currency`,`Inventory`,`Price`,`DiscountPrice`,`Quantity`,`IsHasInventory`,`BarCode`,`Sku`,`CustomSku`,`CreatorId`,`Creator`,`CreationTime`,`LastModifierId`,`LastModifier`,`LastModificationTime`,`EditStatus`,`OriginalPrice` from m_aliexpress_listing_sub where (CustomerId = 1 and LastModificationTime<replace('2024-03-13 12:00:00','%',' ') AND LastModificationTime>= DATE_SUB(replace('2024-03-12 12:00:00','%',' '), interval 2 day));
select `Id`,`CustomerId`,`OrderSourceId`,`SiteId`,`ProductId`,`SellerId`,`OfficialStoreId`,`Type`,`ParentSku`,`Name`,`SubName`,`Tags`,`MainImage`,`CategoryId`,`Price`,`BasePrice`,`OriginalPrice`,`Currency`,`InitialQuantity`,`Quantity`,`SoldQuantity`,`BuyingMode`,`ListingTypeId`,`StartTime`,`StopTime`,`Condition`,`PermaLink`,`AcceptsMercadopago`,`VideoId`,`DescriptionId`,`CatalogProductId`,`DomainId`,`DateCreated`,`LastUpdate`,`Health`,`CatalogListing`,`AutomaticRelist`,`Warranty`,`Status`,`SubStatus`,`SellerSku`,`Inventory`,`Color`,`Size`,`Length`,`Height`,`Width`,`Weight`,`Sku`,`CustomSku`,`CreatorId`,`Creator`,`CreationTime`,`LastModifierId`,`LastModifier`,`LastModificationTime`,`PublishTime`,`UnPublishTime`,`AutoPublishStrategyId`,`AutoPublishTime`,`IsAutoPublish`,`RePublishStrategyId`,`RePublishTime`,`AutoUnPublishStrategyId`,`AutoUnPublishTime`,`AutoAdjustPriceStrategyId`,`AutoAdjustPriceTime`,`AutoPromotionStrategyId`,`AutoPromotionTime`,`LastPhoenixPlanStrategyType`,`OnlineStatus` from m_mercadolibre_listing where (CustomerId = 1 AND LastModificationTime<replace('2024-03-13 12:00:00','%',' ') AND LastModificationTime>= DATE_SUB(replace('2024-03-13 02:00:00','%',' '), interval 48 HOUR));
select `Id`,`CustomerId`,`OrderSourceId`,`ProductId`,`Type`,`Locale`,`ParentSku`,`Name`,`MainImage`,`CategoryId`,`Tags`,`MoreKeywords1`,`MoreKeywords2`,`BrandId`,`Brand`,`Gtin`,`SubProductId`,`SellerSku`,`Price`,`Inventory`,`ShippingFee`,`Color`,`Size`,`Quantity`,`BaseUnit`,`BulkDiscount`,`BulkOrder`,`CouponStartDate`,`CouponEndDate`,`DeliveryTime`,`FreightTemplateId`,`GroupId`,`GroupIds`,`IsImageDynamic`,`IsPackSell`,`AddUnit`,`AddWeight`,`Length`,`Height`,`Width`,`Weight`,`LotNumber`,`OwnerMemberId`,`OwnerMemberSeq`,`MinPrice`,`MaxPrice`,`Src`,`Currency`,`ProductPrice`,`Unit`,`PromiseTemplateId`,`ReduceStrategy`,`SizeChartId`,`ValidNumber`,`PackageType`,`Created`,`Modified`,`Status`,`Summary`,`Display`,`OfflineTime`,`Sku`,`CustomSku`,`CreatorId`,`Creator`,`CreationTime`,`LastModifierId`,`LastModifier`,`LastModificationTime`,`PublishTime`,`UnPublishTime`,`AutoPublishStrategyId`,`AutoPublishTime`,`IsAutoPublish`,`RePublishStrategyId`,`RePublishTime`,`AutoUnPublishStrategyId`,`AutoUnPublishTime`,`AutoAdjustPriceStrategyId`,`AutoAdjustPriceTime`,`AutoPromotionStrategyId`,`AutoPromotionTime`,`LastPhoenixPlanStrategyType`,`OnlineStatus` from m_aliexpress_listing where (CustomerId = 1 and LastModificationTime<replace('2024-03-13 12:00:00','%',' ') AND LastModificationTime>= DATE_SUB(replace('2024-03-12 12:00:00','%',' '), interval 2 day));
select `Id`,`CustomerId`,`OrderSourceId`,`SiteCode`,`ProductId`,`Name`,`MainImage`,`Type`,`IsMain`,`CategoryName`,`Brand`,`Gtin`,`Upc`,`SellerSku`,`Price`,`Msrp`,`Inventory`,`Quantity`,`BuyBoxShippingFee`,`BuyBoxPrice`,`Weight`,`Currency`,`StatusChangeReason`,`LifeCycleStatus`,`PublishStatus`,`LocalStatus`,`ShipMethods`,`Wpid`,`ShelfName`,`PrimaryCatPath`,`OfferStartDate`,`OfferEndDate`,`ItemCreationDate`,`ItemLastUpdated`,`Url`,`ReviewsCount`,`AverageRating`,`IsSearchable`,`CompetitorUrl`,`CompetitorPrice`,`CompetitorShipPrice`,`CompetitorLastDateFetched`,`ProductTaxCode`,`ShippingWeightUnit`,`FulfillmentType`,`Sku`,`CustomSku`,`ProductIdType`,`VariantGroupId`,`FulfillmentLagTime`,`FloorPrice`,`PricePerUnitQuantity`,`PricePerUnitUom`,`ElectronicsIndicator`,`BatteryTechnologyType`,`ChemicalAerosolPesticide`,`MultipackQuantity`,`ShipsInOriginalPackaging`,`StartDate`,`EndDate`,`MustShipAlone`,`ProductIdUpdate`,`SkuUpdate`,`SwatchVariantAttribute`,`SwatchImageUrl`,`FulfillmentLagType`,`IsDeleted`,`ChangeStatus`,`OrignalPrice`,`CreatorId`,`Creator`,`CreationTime`,`LastModifierId`,`LastModifier`,`LastModificationTime`,`PublishTime`,`UnPublishTime`,`AutoPublishStrategyId`,`AutoPublishTime`,`IsAutoPublish`,`RePublishStrategyId`,`RePublishTime`,`AutoUnPublishStrategyId`,`AutoUnPublishTime`,`AutoAdjustPriceStrategyId`,`AutoAdjustPriceTime`,`AutoPromotionStrategyId`,`AutoPromotionTime`,`LastPhoenixPlanStrategyType`,`OnlineStatus` from m_walmart_listing where (CustomerId = 1 AND LastModificationTime<replace('2024-03-13 12:00:00','%',' ') AND LastModificationTime>= DATE_SUB(replace('2024-03-13 02:00:00','%',' '), interval 48 HOUR));
select `Id`,`CustomerId`,`OrderSourceId`,`OfferId`,`ProductId`,`SetId`,`RelationProductId`,`SellerSku`,`Name`,`MainImage`,`PriceFormat`,`Price`,`Currency`,`Inventory`,`Unit`,`Gtin`,`ShippingFee`,`ShippingTime`,`ColorPattern`,`Color`,`Size`,`Quantity`,`Weight`,`SizeTableId`,`PaymentsInvoice`,`Status`,`CreatedAt`,`UpdatedAt`,`ValidatedAt`,`Sku`,`CustomSku`,`CreatorId`,`Creator`,`CreationTime`,`LastModifierId`,`LastModifier`,`LastModificationTime`,`EditStatus`,`OriginalPrice`,`RealProductId` from m_allegro_listing_sub where (CustomerId = 1  AND LastModificationTime<replace('2024-03-13 12:00:00','%',' ') AND LastModificationTime>= DATE_SUB(replace('2024-03-13 02:00:00','%',' '), interval 48 HOUR));

select `Id`,`CustomerId`,`OrderSourceId`,`ProductId`,`Type`,`ParentSku`,`Name`,`MainImage`,`CategoryId`,`Tags`,`Brand`,`OfferId`,`SellerSku`,`Price`,`Inventory`,`Color`,`Size`,`Quantity`,`Sku`,`CustomSku`,`CreatorId`,`Creator`,`CreationTime`,`LastModifierId`,`LastModifier`,`LastModificationTime`,`PublishTime`,`UnPublishTime`,`AutoPublishStrategyId`,`AutoPublishTime`,`IsAutoPublish`,`RePublishStrategyId`,`RePublishTime`,`AutoUnPublishStrategyId`,`AutoUnPublishTime`,`AutoAdjustPriceStrategyId`,`AutoAdjustPriceTime`,`AutoPromotionStrategyId`,`AutoPromotionTime`,`LastPhoenixPlanStrategyType`,`OnlineStatus`,`RealProductId` from m_allegro_listing where (CustomerId = 1 AND LastModificationTime<replace('2024-03-13 12:00:00','%',' ') AND LastModificationTime>= DATE_SUB(replace('2024-03-13 02:00:00','%',' '), interval 48 HOUR));


优化建议:

分页,强制指定LastModificationTime字段开头的索引。


历史记录  
  1. 2024-03-13 14:26:55, 由 吴高发 创建。
  2. 2024-03-13 15:30:51, 由 李乐同 指派给 韦思成。
    修改了 指派给,旧值为 "liletong",新值为 "weisicheng"。
  3. 2024-03-14 14:45:33, 由 韦思成 指派给 王锦。
    修改了 指派给,旧值为 "weisicheng",新值为 "wangjin"。
    修改了 抄送给,旧值为 "",新值为 ",liletong"。
    帮忙看一下这些SQL执行比较慢 ,和金荣查了下是DataX生成的,帮忙按架构师的建议优化一下
  4. 2024-03-16 14:52:14, 由 王锦 解决,方案为 服务器原因 。
    修改了 解决方案,旧值为 "",新值为 "server"。
    修改了 解决日期,旧值为 "",新值为 "2024-03-16 14:51:51"。
    修改了 指派给 ,旧值为 "wangjin",新值为 "wugaofa"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "wangjin"。
  5. 2024-03-16 15:16:07, 由 吴高发 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "wugaofa",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "wugaofa"。
    修改了 关闭日期,旧值为 "",新值为 "2024-03-16 15:16:07"。
    再发现,再提bug。
所属项目 技术中心-需求池
所属模块 系统运维   性能优化
所属计划
所属迭代
Bug类型 性能问题
严重程度 一般
优先级 P1
Bug状态 已关闭
业务部门
影响功能
开发责任人
测试责任人
解决时效 0
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2024-03-16 15:16:07
截止日期 0000-00-00
上线时间
上线时效
操作系统
浏览器
关键词
抄送给 李乐同
所属迭代
相关需求
相关任务
由谁创建 吴高发 于 2024-03-13 14:26:55
影响环境 590

由谁解决 王锦 于 2024-03-16 14:51:51
解决版本
解决方案 服务器原因
由谁关闭 吴高发 于 2024-03-16 15:16:07
最后修改 吴高发 于 2024-03-16 15:16:07
相关Bug