September 9, 2010  
  Register Login 
BLOGS
There are no categories in this blog.

SEARCH BLOG

BLOG ARCHIVE
Archive
<September 2010>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
Monthly
October, 2008
  SQL Server Blogs     



Your Ad Here

 

Use dm_exec_query_stats to find data for all statements in the cache: number of times the query has been executed, the longest query to execute.

Use these tow objects:

sys.dm_exec_query_stats
sys.dm_exec_sql_text

 Run this query to find most frequently executed queries in SQL Server 2005

select* from sys.dm_exec_query_stats as across apply sys.dm_exec_sql_text(a.sql_handle) as b order by execution_count desct
Run DBCC FREEPROCCACHE to to clear the procedure cache before start monitoring.

Permalink |  Trackback
Location: BlogsStevan Tosic    
Posted by: host 10/15/2008 10:40 AM
Copyright 2007 by www.dballinks.com Terms Of Use Privacy Statement