Welcome to

SqlServer-QA.net

Sign in | Join | Help

Browse by Tags

All Tags » query plan   (RSS)

Query to obtain every dependent object of a compiled plan when you pass a valid plan_handle in as a parameter

Every database object will have a sort of dependency between them, such as a stored procedure to run few queries against a table. Similar to this whenever a SP or query is executed then a compiled plan will be generated by the SQL query optimizer, to

TSQL to get TOP 10 queries that are using I/O generation, SQL Server 2005

DMVs are most helpful to find instant information on SQL instance without causing further delays, in any performance degradation time you can execute following TSQL to get top 10 queries that are generating lots of I/O on the server: SELECT TOP 10 total_logical_reads,

Show text from sql_handle

Based upon the query or stored procedure execution the plan will be stored in the cache, but it may not be in readable format as it is stored in Hexadecimal when you simply query SYSPROCESSES table. So in order to extract the query plan that is in cache,