Arun Kumar

Find Most executed queries

SELECT TOP 50
QueryState.execution_count
,OBJECT_NAME(objectid)
,query_text = SUBSTRING(
qt.text,
QueryState.statement_start_offset/2,
(CASE WHEN QueryState.statement_end_offset = -1
THEN len(convert(nvarchar(max), qt.text)) * 2
ELSE QueryState.statement_end_offset
END - QueryState.statement_start_offset)/2)
,qt.dbid
,dbname = db_name(qt.dbid)
,qt.objectid
FROM sys.dm_exec_query_stats QueryState
CROSS APPLY sys.dm_exec_sql_text(QueryState.sql_handle) as qt
ORDER BY...

2018-09-18

197 reads

Get all queries running against any specific table

/*Get list of all queries hitting any specific tables*/SELECT DISTINCT TOP 100ProcedureName = OBJECT_SCHEMA_NAME(sqlTxt.objectid) + '.' + OBJECT_NAME(sqlTxt.objectid),SQLStatement = SUBSTRING(sqlTxt.Text,(QueryState.statement_start_offset/2)+1,CASE QueryState.statement_end_offsetWHEN -1 THEN DATALENGTH(sqlTxt.text)ELSE QueryState.statement_end_offsetEND...

2018-09-18

150 reads

Blogs

Understanding Disk Performance and IOPS in cloud platform

By

In the past many years, apart from working as DBA, I was working with...

COVID-19, a wake-up call

By

COVID-19 is the only pandemic I’ve seen in my whole life. It gave me...

ASF 030: Benni De Jagere interview

By

Introduction Benni De Jagere is a Senior Data Insights Consultant with a strong focus...

Read the latest Blogs

Forums

Epic Keto

By hgumbdqwpkod

https healthygossips com/epic-keto/  

How to make join to teams display without join all teams ?

By ahmed_elbarbary.2010

problem How to make left join to only teams displayed  dynamically depend on fields...

sql server memory buffer cache building up question

By sqlguy80

question for DB Gurus when sql server is restarted, it will be slow at...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

SQLCMD Output

See possible answers