About two years ago I started www.TSQLScripts.com, and initially the response was great. Within two weeks I had received about 25 submissions. This set me up for about 6 months of Script of the Week. Unfortunately, the submissions came to a screeching halt and I really did not have the time to submit a script a week. So I kind just let it fade. Since I have been blogging and becoming more active in the community, I have been receiving more and more emails about new scripts on the site. Therefore, I have decided to give the site “New Life”. I will be searching the Internet for scripts and attempting to write scripts that are worthy of the title, “Script of the Week”. If I use a script that I did not write, I will give the author full credit. So if any of you have some scripts that you would like to share with our SQL Server Community feel free to email it to pleblanc@tsqlscripts.com or register at TSQLScripts.com and submit it yourself.
Once a week I will be posting “The Script of the Week” here. If you are registered with TSQLScripts.com you will receive the script via newsletter from the site. This weeks script is written by Ian Stirk. The script allows you to inspect cached plans and extract information that can be used in improving performance of your SQL Queries.
CREATE PROC [dbo].[dba_SearchCachedPlans] Parameters: @StringToSearchFor - string to search for e.g. 'MissingIndexes'. Revision History: -----------------------------------------------------------------------*/ |
Example Usage of the Stored Procedure:
1. exec dbo.dba_SearchCachedPlans '%<MissingIndexes>%'
2. exec dbo.dba_SearchCachedPlans '%<ColumnsWithNoStatistics>%'
3. exec dbo.dba_SearchCachedPlans '%<TableScan%'
4. exec dbo.dba_SearchCachedPlans '%CREATE PROC%MessageWrite%'
If you want more details about the query go to:http://www.sqlservercentral.com/articles/Performance+Tuning/66729/. If you want to see more scripts like Ian’s please visit www.tsqlscripts.com
Talk to you soon
Patrick LeBlanc. Founder TSQLScripts.com and the SQLLunch
SQL Down South
No comments:
Post a Comment