select
db_name(st.dbid) as database_name,
object_name(st.objectid) as name
-- ,p.size_in_bytes / 1024 as size_in_kb,
-- p.usecounts,
-- st.text
from sys.dm_exec_cached_plans p
cross apply sys.dm_exec_sql_text(p.plan_handle) st
where p.objtype = 'proc'
and st.dbid = db_id('DBName_Mahesh')
and object_name(st.objectid) = 'Chat_GetUserId'
order by p.usecounts desc
db_name(st.dbid) as database_name,
object_name(st.objectid) as name
-- ,p.size_in_bytes / 1024 as size_in_kb,
-- p.usecounts,
-- st.text
from sys.dm_exec_cached_plans p
cross apply sys.dm_exec_sql_text(p.plan_handle) st
where p.objtype = 'proc'
and st.dbid = db_id('DBName_Mahesh')
and object_name(st.objectid) = 'Chat_GetUserId'
order by p.usecounts desc
No comments:
Post a Comment