Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Jesse McLain,
This script helps developers test the performance of a stored procedure or block of code. Although it was written specifically to assist me in comparing stored procedures, it can easily be modified for other testing purposes.
The script expects two tables, 'Seq1' and 'Seq2' to exist, and be of the structure as listed in the header comment of the script. It will test the code of interest by running it using different input sizes, multiple times, and record the performance of each run. The code it tests, as listed in the script, can be found here.
The user should modify the values of these variables:
@RunsPerInputSize - the more runs at each input size, the more consistent the results
@InputSizeIncrement - the algorithm will start at this input size and also increment by it
@TotalNumberIncrements - the total number of different input sizes to test
For example, with @RunsPerInputSize = 2, @InputSizeIncrement = 50, and @TotalNumberIncrements = 3, the testing script will run the code to be tested with the following input sizes, in this order: 50, 100, 150, 50, 100, and 150.
Written by Jesse McLain
Input values are validated using various mechanisms. let’s start by examining how you would validat...
Multi Server script to find OS and Memory details. It doesn’t require a text file as its input but ...
Inputting sport times
Identify all objects containing unused input parameters.