Tag: aspdotnetstorefront

sql在asp.net中慢速运行ssms

我已经有这个问题了几个星期了。 问题是,查询需要4-5分钟在网站上运行,最多2或3秒钟才能在ssms中运行。 另外我发现,在对这个查询做了一些改变,比如添加customerIdvariables后,它会在网页上快速运行,但是到第二天又会变慢。 有问题的查询是这样的: DECLARE @customerID INT SET @customerID = @CustID DECLARE @MyTable table( Iden int NOT NULL IDENTITY(1,1), ProductID int) INSERT INTO @MyTable(ProductID) SELECT P.ProductID FROM Product P WITH (NOLOCK) left join Compunix_ProductMMY cpmmy with (nolock) on p.ProductID = cpmmy.ProductID left join Compunix_CustomerMMY ccmmy with (nolock) on ccmmy.mmyid = cpmmy.mmyid WHERE P.Deleted=0 AND P.Published=1 […]