Geeks With Blogs
Sreenivas Mogullapalli Microsoft Technologies Geek July 2009 Entries
some helpful stuff for identifying which need optimization in sql server
-- Query to identify the missing indexes in t-sql of sql server -- from the dynamic views BEGIN -- Do not lock anything, and do not get held up by any locks. SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT TOP 20 st.text AS [SQL] , cp.cacheobjtype , cp.objtype , DB_NAME(st.dbid)AS [DatabaseName] , cp.usecounts AS [Plan usage] , qp.query_plan FROM sys.dm_exec_cached_plans cp CROSS APPLY sys.dm_exec_sql_text(cp.pla... st CROSS APPLY sys.dm_exec_query_plan(cp.p... qp WHERE CAST(qp.query_plan ......

Posted On Wednesday, July 8, 2009 6:41 AM

Copyright © Sreenivas Mogullapalli | Powered by: