Hi guys,
We have an issue where one of our queries keeps on using an incorrect query plan. We have run Sp_updatestats several times but the statistics just wont update. I have tried the following as well.
SELECT cp.plan_handle, st.[text]
FROM sys.dm_exec_cached_plans AS cp
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st
WHERE [text] LIKE N'%[plan_handle]%';
-- Remove the specific plan from the cache using the plan handle
DBCC FREEPROCCACHE ([plan_handle]);
But still no success.
Has anyone had a similar problem like this before?
Regards
IC