sp ya da sorguda execution FREEPROCCACHE plan sorunu cozme
Definition Description
CANSU TIMEOUT DUZELTME -- STEP 1
SELECT TOP(100) [text], cp.size_in_bytes, usecounts, refcounts ,db_name(dbid) as dbName, 'DBCC FREEPROCCACHE ( ', plan_handle , ')' FROM sys.dm_exec_cached_plans AS cp CROSS APPLY sys.dm_exec_sql_text(plan_handle) WHERE cp.cacheobjtype = N'Compiled Plan' AND cp.objtype = N'Prepared' AND cp.usecounts > 1 AND text like '%CandidateSearchLog%' ORDER BY cp.size_in_bytes DESC;
--STEP4 -- sorunlusorguyu ya da stored procedure execution plan oluşması icin sabirlabekle ve monitoret lock var mi?!?
SELECT TOP (10000000) Id, Name FROM ( SELECT ROW_NUMBER() OVER(ORDER BY MAX(i.Id) DESC) AS RowNumber, MAX(i.Id) AS Id, i.Kriter AS Name FROM IsAramaLogDB AS i (nolock) WHERE i.LoginId = 6513040 and i.kriter IS NOT NULL AND i.kriter!= '' group by i.Kriter ) AS Result WHERE RowNumber > 0
--Mesaj HareketDB SELECT TOP(100) [text], cp.size_in_bytes, usecounts, refcounts ,db_name(dbid) as dbName, 'DBCC FREEPROCCACHE ( ', plan_handle , ')' FROM sys.dm_exec_cached_plans AS cp CROSS APPLY sys.dm_exec_sql_text(plan_handle) WHERE cp.cacheobjtype = N'Compiled Plan' AND cp.objtype = N'Prepared' AND cp.usecounts > 1 AND text like '%GetCandidateUnReadMessageCount%' ORDER BY cp.size_in_bytes DESC;
--STEP4 -- sorunlusorguyu ya da stored procedure execution plan oluşması icin sabirlabekle ve monitoret lock var mi?!?
USE [AtlantisDB] GO DECLARE @return_value int EXEC @return_value = [dbo].[GetCandidateUnReadMessageCount] @candidateId = 6513040 SELECT 'Return Value' = @return_value GO