[步骤]
shopeeListing全球产品管理--》上架编辑页面--》类目搜索,搜索“食物夹” 超时
[结果]
超时,没搜索结果
[期望]
将SQL 【
With CategoryTree(CategoryId,CategoryName,ParentId,IsHasChildren,PathIds,PathNames) AS
(
Select CategoryId, CategoryName, ParentId, IsHasChildren, (cast(CategoryId as varchar(MAX))) as PathIds,cast(CategoryName as varchar(MAX)) as PathNames
From [RB_Shopee_Listing_Category](nolock) WHERE ParentId =0 and OrderSourceCountry='' and CategoryVersion = 2
Union All
Select l.CategoryId,l.CategoryName,l.ParentId,l.IsHasChildren,
cast((PathIds + '>>' + cast(l.CategoryId as varchar(MAX))) as varchar(MAX)),
cast((PathNames + '>>' + l.CategoryName) as varchar(MAX))
From [RB_Shopee_Listing_Category](nolock) l Inner join CategoryTree p ON l.ParentId=p.CategoryId
)
Select top 50 CategoryId,CategoryName,ParentId,IsHasChildren,PathIds,PathNames FROM CategoryTree where CategoryName like N'%食物夹%' order by CategoryId
】优化后,能查出数据


