The default value for the parameter is Null. And the result was the same wether you call the procedure specifying Null as the default value for the...
Back online. I believe if found the problem. So far all these solution are working : specifying a date parameter, even GETDATE(). Using a local...
These are system created auto statistics. If I use your @datetemp code, execution time is 0 seconds, with an execution plan equivalent to the one I...
There is an index on IdETMission. The column EvtDateValeur is the creation date of the row, so there is each value is different (well, almost...
I tried this :CREATE STATISTICS datEvenement_IdEvtEvenementType ON dbo.datEvenement (IdEvtEvenementType) WITH FULLSCAN but I'm back to 46 seconds...
I found an interesting solution : if I use table hints to force SQL Server to perform the join by filter on IdEvtEvenementType first (using WITH...
I tried updating statistics (UPDATE STATISTICS dbo.datEvenement WITH FULLSCAN, using DBCC DROPCLEANBUFFERS and using EXEC dbo.qryTestPerformance WITH...
I am experiencing performance issues with SQL 2005. I have the following stored procedure : ALTER PROCEDURE [dbo].[qryTestPerformance] (...
Separate names with a comma.