Hello, you are not logged in.  Login or sign up
Community >> Blogs
Search Toad World Search

Do you have a topic that you'd like discussed?  We'd love to hear from you.  Send us your idea for a blog topic.

The importance of SQL scalability testing
 
Location: Blogs Jim Wankowski    
 JimWankowski Thursday, August 30, 2007 1:26 PM

As we all know, there are many factors that influence the performance of your application. Proper memory allocations, physical design, how the SQL is written and workload all affect the way your queries perform. One of most overlooked parts of testing an application is testing queries under production workload conditions.  A seemingly simple query runs fine in your test environment, but how will it perform when 10, 25 or 50 end users are running the query concurrently?

One of the neater features in Toad® for DB2 is the integration with SQL Optimizer and Benchmark Factory® to do automated index analysis and scalability testing. Once you have a query built the optimizer can recommend indexes and simulate real world user loads. 

In this example below a query containing a 3 table join is being run in a DB2 V8 Windows environment. The SLA for this application is to maintain a sub-second response time during peak user time. The query is initially test run with production data volume with an average elapsed time around 230 milliseconds; well below my SLA requirement. I then put the query through a scalability test escalating users from 10 to 25, to 50.  As you can see from the graph, the average response time jumped to over 4 seconds, which is completely unacceptable for this application.

After running the query through Toad’s EXPLAIN, you can see that all 3 tables are doing tablespace scans. 

The query was then launched into SQL optimizer and the Index Expert option was run.  It determined the indexes to be created to optimize this query. 

The Indexes were created and the scalability test was run again. This time the query maintained its sub second response time even with 50 concurrent users.

This simple demonstration highlights the importance of doing realistic testing of SQL prior to putting it into production.

Copyright ©2007 Quest Software Inc.
Permalink |  Trackback

Comments (2)   Add Comment
By hillbillyToad on Friday, August 31, 2007 11:58 AM
Wicked cool example. It's always nice to see the theoretical 'better' setups actually run better in practice and esp when you can prove it with simple screenshots!

For anyone interested, Benchmark Factory can be used to test runs up to 100 users for the version that comes with Toad. You can then buy more additional 'virtual' users in increments of 100.

By ToadWorldAdmin on Sunday, September 09, 2007 2:07 PM
Just as a reminder, Toad World's current exclusive freeware download is a 20 'virtual' user license of Benchmark Factory. Go to Toad World's Download page (http://www.toadworld.com/Downloads/tabid/60/Default.aspx) to get your copy.


Comment:
Add Comment   Cancel 
Search Blog Entries
 
Copyright 2008 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us