New answers tagged

0

Is there a way to find out what queries are run the most against a particular table? T-SQL – Get a Historical Record of SQL Statements Hitting a Table This query checks the sys.dm_exec_query_stats system view and the sys.dm_exec_sql_text table valued function. Also because these are system tables, you will need to be logged into SQL Server ...


0

I do it like this: EXEC sp_whoisactive @get_plans=1, @output_column_list='[login_name][dd%][session_id][program%][sql_com%][sql_text][block%][reads][writes][physical_reads][query_plan][used_memory][tempdb%][wait%][collection_time][host%][additional%]', @get_outer_command=1, @get_additional_info=1 --, @help=1 --, @filter_type='program' ,@filter='%myprogram%' ...


7

This information -- run-time parameter values passed into a Stored Procedure (i.e. RPC call) or parameterized query -- is only available via a SQL Trace (and I assume the equivalent Extended Event in the newer versions of SQL Server). You can see this by running SQL Server Profiler (it comes with SQL Server) and selecting the various "Completed" events, such ...


7

You can turn on the actual execution plan and then look at the execution plan XML. Or you can use sql sentry's plan explorer tool and see the parameters tab that will list the compiled value and run time value for actual execution plan. If you cannot turn on the actual plan then you can look into plan cache as described below. -- borrowed from Erland ...



Top 50 recent answers are included