THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Kalen Delaney

Geek City: Poor (Wo)Man's Load Testing

 

Last July, I posted about a way to run a batch multiple times when you use GO as the batch separator. I usually take advantage of this technique when I am loading test data into a table.

I was mentioning this feature to my class last week in Minneapolis, and one of the students thought that this feature had another use. He thought it would be great to use it to simulate load testing. One connection could execute a procedure and terminate the batch with GO 100 and another connection could be started that did the same thing. You could open up multiple query windows using Management Studio (or Query Analyzer) and have each one run a procedure, or even a statement, over and over again. You could also have different connections run different stored procedures or statements. This will allow you to detect problems with concurrency, which most query tuning techniques do not take into account.

In the past, I had recommended using the Replay feature of SQL Server Profiler to simulate a "poor man's load testing" environment, but this great idea would make it even easier!

Of course, for the rich (wo)man, there is also very nice load testing software available. Whether rich or poor, it's crucial to make sure you test your queries and procedures with multiple users.

Have fun!

~Kalen

Published Wednesday, October 24, 2007 1:28 PM by Kalen Delaney
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Adam Machanic said:

Hi Kalen,

I created SQLQueryStress to solve this problem...

http://datamanipulation.net/sqlquerystress/

October 24, 2007 3:50 PM
 

Kalen Delaney said:

Thanks for the link!

This idea isn't even really for stress testing, but really just for concurrency testing. Nothing to download, nothing new to install and configure... just run the same query multiple times to see if you can deal with concurrent access.

~Kalen

October 24, 2007 4:37 PM
 

James Luetkehoelter said:

Actually, to put in my two cents (and I'm a nosy person anyway), I consider one of the prime objectives of stress testing is to discover concurrency issues. Adam? Would you agree?

October 27, 2007 6:03 PM
 

Adam Machanic said:

James: Absolutely!

October 28, 2007 7:04 AM
 

david wei said:

Great Tool!

I found the old version 0.9.4 is more stable.

The new version 0.9.7 sometimes hang and cause CPU 100%.

October 30, 2007 1:11 PM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Favorite Non-technical Sites or Blogs

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement