HiI have an issue with a very slow dataset (initial response and use) that works perfectly well in SSMSI have a stored procedure that takes 2 parameters (startdate and enddate)In SSMS, it runs it about 2 secondsI have a report that uses this as a dataset in SSRSAgain, this works in a couple of secondsI've then taken that procedure, renamed it and added another couple of attributesNow, in SSMS, it continues to execute in about 2 secondsIn SSRS, I am having issuesIf I try and add this as a stored procedure based dataset, it takes about 5 minutes before eventually coming backI can then use this and create a new report (or amend my existing report)Now when I execute the new report that uses the new SP, it takes about 10 minutes to run (not 2 seconds!)I've read a lot about [b]parameter sniffing[/b] and method such as [b]with compile[/b] and [b]set arithabort on[/b]Nothing seems to make this any quickerHere's my start:[code]create PROCEDURE [dbo].[spGetClaimPaymentDetailsv3](@StartDate AS DATETIME, @EndDate AS DATETIME) with recompileasset nocount on;SET ARITHABORT ON;DECLARE @sd AS DATETIME = @StartDateDECLARE @ed AS DATETIME = @EndDate[/code]I then use @sd and @ed rather than @StartDate and @EndDateIs there anything else I should be doing here?ThanksDamian.
↧