[步骤]
zhcxkj-erpapi-dotnet-api-5bc775b686-bzk5d

(@CustomerID0Join0 int,@CustomerID0Join1 int) SELECT COUNT(1) FROM (SELECT [p].[Id] AS [ID] , [p].[CustomerID] AS [CustomerID] , [p].[SKU] AS [SKU] , [p].[ProductProperty] AS [ProductProperty] , [p].[ProductState] AS [ProductState] , [p].[DeleteStatus] AS [DeleteStatus] , [a].[NoSalePlatform] AS [NoSalePlatform] , [a].[NoSaleCountry] AS [NoSaleCountry] FROM (SELECT [Id] AS [Id] , [CustomerID] AS [CustomerID] , [SKU] AS [SKU] , [ProductProperty] AS [ProductProperty] , [ProductState] AS [ProductState] , [DeleteStatus] AS [DeleteStatus] FROM [RB_Product] WITH(NOLOCK) WHERE ( [CustomerID] = @CustomerID0Join0 )) p Inner JOIN (SELECT [CustomerID] AS [CustomerID] , [SKU] AS [SKU] , [NoSalePlatform] AS [NoSalePlatform] , [NoSaleCountry] AS [NoSaleCountry] FROM [RB_Product_Admin] WITH(NOLOCK) WHERE ( [CustomerID] = 1 )) a ON (( [p].[CustomerID] = [a].[CustomerID] ) AND ( [p].[SKU] = [a].[SKU] )) ) CountTable
(@CustomerID0Join0 int,@CustomerID0Join1 int)SELECT [p].[Id] AS [ID] , [p].[CustomerID] AS [CustomerID] , [p].[SKU] AS [SKU] , [p].[ProductProperty] AS [ProductProperty] , [p].[ProductState] AS [ProductState] , [p].[DeleteStatus] AS [DeleteStatus] , [a].[NoSalePlatform] AS [NoSalePlatform] , [a].[NoSaleCountry] AS [NoSaleCountry] FROM (SELECT [Id] AS [Id] , [CustomerID] AS [CustomerID] , [SKU] AS [SKU] , [ProductProperty] AS [ProductProperty] , [ProductState] AS [ProductState] , [DeleteStatus] AS [DeleteStatus] FROM [RB_Product] WITH(NOLOCK) WHERE ( [CustomerID] = @CustomerID0Join0 )) p Inner JOIN (SELECT [CustomerID] AS [CustomerID] , [SKU] AS [SKU] , [NoSalePlatform] AS [NoSalePlatform] , [NoSaleCountry] AS [NoSaleCountry] FROM [RB_Product_Admin] WITH(NOLOCK) WHERE ( [CustomerID] = @CustomerID0Join1 )) a ON (( [p].[CustomerID] = [a].[CustomerID] ) AND ( [p].[SKU] = [a].[SKU] )) ORDER BY Id Desc OFFSET 788100 ROWS FETCH NEXT 300 ROWS ONLY
[结果]
[期望]
减低频率,做好缓存,从读库读取数据
这个是自动刊登这边写的方法,让他们看下