| How to get the table count in last used query from cache by sending tablename?
Below is the query to get the number of time query execute from cache and we need to put the table name.
SELECT dest.text
, deqs.execution_count
FROM sys.dm_exec_query_stats deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.plan_handle) dest
WHERE dest.text LIKE '%table_name%'
GO
| | |