Hello, you are not logged in.  Login or sign up
Toad on Twitter Follow Toad Search Toad World Search
Blogger List   

All Recent Blog Entries
 

Johannes Ahrends
Unicode and Toad

Ben Boise
Toad SC Discussions

Kevin Dalton
Benchmark Factory

Steven Feuerstein
PL/SQL Obsession

Devin Gallagher
Toad SC discussions

Stuart Hodgins
JProbe Discussions

  Henrik "Mauritz" Johnson
Toad Tips & Tricks on the "other" Toads
  Mark Kurtz
Toad SC discussions
  Michael Lumbard
Toad SC discussions
Daniel Norwood
Toad for Data Analysts,
Toad Extension for Visual Studio
Debbie Peabody
Toad for Data Analysts
Gary Piper
Toad Reports Manager
John Pocknell
Toad for Oracle, JProbe
Kuljit Sangha
Toad SC discussions
Bert Scalzo Indicates Oracle ACE status
Toad for Oracle, Data Modeling, Benchmarking
Jeff Smith
Toad product family
Richard To
SQL Optimization
Jim Wankowski
DB2 - LUW and z/OS
John Weathington
  Toad World Editor
Toad World issues

  Toad Data Modeler Opens in a new window
Data Modeling
 
  Real Automated Code Testing for Oracle
Quest Code Tester blog

Blogs
Toad and Database Commentaries

Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies.  Have some views of your own to share?  Post your comments!  Note:  Comments are restricted to registered Toad World users.

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.

Executing SQL In Tuning Lab – Part 6 – Testing in a Development Environment
 
Location: Blogs Richard To's Blog    
 RichardTo Friday, June 26, 2009 6:05 AM

Written by Rene Woody

This blog is a continuation of a series about test running the SQL statements in the Tuning Lab in Quest SQL Optimizer for Oracle to find the best performing SQL statement in your database environment. It covers testing the SQL alternatives in a development environment when it is not possible to do extensive testing in the production environment.

When optimizing a SQL statement, you need to test the alternatives that are created to see if these alternatives actually improve the performance of your original SQL statement. One way to do this testing is to have a development database that can simulate as closely as possible the production database. Some lucky developers have the resources to create a development database from the full backup of the production database. However, most developers have a smaller development database than that of the production database to use for testing. In this case, it is important that the data volumes in the tables in the development database be in the same proportion from one table to another as is in the production database. For example, if you have 1,000,000 records in TableA and 1,000 records in TableB in your production database, then it would be better to have 100,000 and 100 records in TableA and TableB in the development database than to have 100,000 records in both tables. Keeping the data volume proportional helps get consistent performance across production and development databases. 

Once you have a development database that is "like" the production database, you can use it to do the first round of testing all alternatives and find a few potentially better SQL alternatives. Then you can execute those better SQL alternatives in a second round of testing in the production database. In this way, you would be able to reduce the number of SQL executed against your production database. But one thing you should remember is that a SQL alternative running in the development database with different statistics from the production database may have a different execution plan in each database. This is especially true for those SQL statements without Oracle optimization hints embedded. For those SQL statements with Oracle hints, the execution plan will be more stable across the broad.

If you would like to learn more about Quest SQL Optimizer for Oracle, please visit the Inside SQL Optimizer for Oracle community.
Permalink |  Trackback

Comments (1)  
By hillbillyToad on Friday, June 26, 2009 6:35 AM
And remember that Toad can help you migrate statistics from your production to development environments to mitigate plan differences in your tuning alternatives!

Search Blog Entries
 
Copyright 2010 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us