September 18, 2013 at 1:58 am
Dear All
I am using foloing query to get list of last executed queries
SELECT deqs.last_execution_time AS [Time], dest.text AS [Query], dest.*
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC
But noticed that for many rows dbid column is null.
What does this null value means?
Regards
September 18, 2013 at 5:20 am
That they're ad-hoc queries, not stored procedures.
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
September 18, 2013 at 10:53 pm
But these quereis are also ran against specific db ( like slect count(*) from xxx) then what does the null db id menas?
September 19, 2013 at 4:19 am
It means they are ad-hoc queries, nothing more.
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 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply