June 2, 2009 at 1:23 pm
Running the following query I found a high hit count on this and I don't know where or why it's being called. Before I setup a trace I thought I'd run it through you guys.
select left(zz.objtype,10) as 'OBJTYPE',substring (cacheobjtype,1,10)as 'CacheObjType', usecounts, LEFT([sql].[text], 100) as [text]
from ( select s.objtype,
s.cacheobjtype,
s.plan_handle,
s.usecounts,
rank() over (partition by s.objtype
order by (s.usecounts) desc) as UCRank
from sys.dm_exec_cached_plans s where s.objtype = 'Prepared'
) zz
outer apply sys.dm_exec_sql_text (zz.plan_handle) sql
where zz.UCRank <= 3 and zz.objtype <> 'Check'
OBJTYPECacheObjTypeusecountstext
PreparedCompiled P777204select top 1 1 test from sysobjects (nolock)
PreparedCompiled P777196select top 1 1 test from sysobjects (nolock)
PreparedCompiled P777096select top 1 1 test from sysobjects (nolock)
John Zacharkan
June 4, 2009 at 8:20 am
Is this the right forum for this question? :unsure:
John Zacharkan
June 4, 2009 at 8:28 am
3rd party monitoring tool?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply