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
Oracle PL/SQL

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
Debbie Peabody
Toad for Data Analysts
Gary Piper
Toad Reports Manager
John Pocknell
Toad for Oracle
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.

Richard To's Blog
 Print  
Author: RichardTo Created: Monday, October 30, 2006 2:28 PM

Richard To is chief technologist and designer of Quest SQL Tuning products. Richard specializes in using AI technique to solve database performance problems.

Rene Woody has a varied background in applications and systems programming, databases, classroom training, documentation, post and pre-sales technical support.

Richard and Rene's blog helps solve problems in your SQL code, tune queries, and shares new tips, tricks, and techniques on SQL tuning.

Recent postings on SQL tuning:


SQL Best Practice is SQL Tuning? -10 Common Misconceptions in SQL Tuning #5
RichardTo Wednesday, November 18, 2009 9:55 AM
This blog is the fifth in a series about misconceptions surrounding SQL tuning that are quite common.
 
Around 15 years ago, when I was a DBA both for Oracle and Sybase, a lot of SQL came from my colleagues which I needed to tune.  Initially, I en ...
Read More...

Highlights of SQL Optimizer 7.5
RichardTo Friday, October 02, 2009 3:59 AM

Version 7.5 of Quest SQL Optimizer for Oracle will be released in October. The major effort for this new release was in the optimizer engine and the new UI for the optimization, index generation and execution functions. The following is a screen shot of the new UI. It looks tidy and easier to use compared to the old version. All the statistics names now use the Oracle standard na ...

Read More...

Executing SQL In Tuning Lab – Part 10 – Performance Improvement Expectations
RichardTo Friday, August 21, 2009 6:10 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 envi ...

Read More...

A SQL that returns records faster is not necessarily better-10 Common Misconceptions in SQL Tuning #4
RichardTo Friday, August 14, 2009 5:52 AM

This blog is the fourth in a series about misconceptions surrounding SQL tuning that are quite common. It covers the misconception that the goal of SQL tuning is only to make a SQL return all the records faster.

I still remember around 20 years ago, I was using SQL*Plus to tune my SQL statements. At that time, it was my impression that a good SQL rewrite was one that normally would return the ...

Read More...

Executing SQL In Tuning Lab – Part 9 – Why Run Times Vary
RichardTo Friday, August 07, 2009 6:16 AM

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 why the run time of a SQL statement may vary from one execution to th ...

Read More...

Executing SQL In Tuning Lab – Part 8 – Criteria for Best SQL
RichardTo Friday, July 24, 2009 6:57 AM
When selecting the best performing SQL statement for your application, how should disk I/O be weighed in comparison to the run time when you are selecting the best SQL alternative to replace your original SQL statement?
Read More...

Executing SQL In Tuning Lab – Part 7 – Testing SQL with Variables
RichardTo Friday, July 10, 2009 5:33 AM
A SQL statement with a variable that is provided at run time poses an extra challenge when trying to determine which alternative SQL statement is going to give the best overall performance. Each time the SQL statement is executed, a different variable could be supplied.
Read More...

Executing SQL In Tuning Lab – Part 6 – Testing in a Development Environment
RichardTo Friday, June 26, 2009 6:05 AM
This blog covers testing the SQL alternatives in a development environment when it is not possible to do extensive testing in the production environment.
Read More...

No single SQL syntax is always the best - 10 Common Misconceptions in SQL Tuning#3
RichardTo Tuesday, June 16, 2009 6:26 AM
Written by Richard To
 
This blog is the third in a series about misconceptions surrounding SQL tuning that are quite common. It covers the misconception that there is always some SQL syntax that is the best across different databases and hardware environments.
Read More...

Executing SQL In Tuning Lab – Part 5 – Selecting Alternatives to Test
RichardTo Friday, June 12, 2009 5:27 AM
In Quest SQL Optimizer when you generate alternative SQL statements for your original SQL statement you may be presented with hundreds of SQL alternatives. The only way to be completely sure that you have the fastest one is to run all the SQL alternatives. But unless the SQL statements run relatively quickly, this is not always practical. So then you are left to determine which SQL statements you should select to test.
Read More...

Executing SQL In Tuning Lab – Part 4 – Equal Comparison for Run Times: Eliminating the Effect of Network Traffic
RichardTo Friday, May 29, 2009 3:13 AM
When you are executing SQL statements to find which one is the best, you need to take into consideration the factors that can skew the accuracy of the results of the testing. This blog discusses eliminating the effect of network traffic when you are comparing SQL run times.
Read More...

Executing SQL In Tuning Lab – Part 3 – Equal Comparison for Run Times: Minimizing the Effect of Other Activities on the CPU
RichardTo Friday, May 15, 2009 2:58 AM
When you are executing SQL statements to find which one is the best, you need to take into consideration the factors that can skew the accuracy of the results of the testing. This blog discusses minimizing the effect of other activities on the CPU when you are testing very fast running SQL statements.
Read More...

Executing SQL In Tuning Lab – Part 2 – Equal Comparison for Run Times: Minimizing the Effect of Caching
RichardTo Friday, May 01, 2009 4:56 AM
When you are executing SQL statements to find which one is the best, you need to take into consideration the factors that can skew the accuracy of the results of the testing. These factors include caching the data, caching the indexes, caching the SQL statement, other activities on the CPU, and network traffic.
Read More...

10 Common Misconceptions in SQL Tuning #2
RichardTo Tuesday, April 28, 2009 8:50 AM

This blog is the second in a series about common misconceptions surrounding SQL tuning. It covers the misconception that the goal of SQL tuning is to write a better SQL statement. The real goal of SQL tuning is not to create a better SQL statement, but it is to help the database optimizer to make the right decision when it is choosing the execution plan.

If you browse the internet with the key ...

Read More...

Executing SQL in Tuning Lab – Part 1 – Criteria for Terminating SQL
RichardTo Friday, April 17, 2009 2:37 AM
Written by Rene Woody

This blog is the first 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 the options for terminating the SQL alternatives when they are executed in a batch.
Read More...

SQL Optimizer Part 10 – How to Optimize without Oracle Hints
RichardTo Monday, April 13, 2009 2:18 AM

Written by Rene Woody
 
This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle.  ...

Read More...

10 Common Misconceptions in SQL Tuning #1
RichardTo Friday, March 13, 2009 4:11 AM
This blog is the first in a series about misconceptions surrounding SQL tuning that are quite common. The first one covers the misconception that you can use the estimated cost from the database SQL optimizer to accurately judge the performance of a SQL statement in comparison to its rewrites.
 
SQL tuning is a very interesting topic and most DBA or devel ...
Read More...

SQL Optimizer Part 9 – How to Shorten a Long Optimization Time
RichardTo Friday, February 13, 2009 6:16 AM

Written by Rene Woody

This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle.  It sheds some insight o ...

Read More...

How to use Quest SQL Optimizer to tune complex SQL - A real life example #2
RichardTo Wednesday, February 04, 2009 10:35 AM
In a previous blog http://www.toadworld.com/Community/Blogs/tabid/67/EntryID/324/Default.aspx I discussed a real life example of “How to use Quest SQL Optimizer to tune complex SQL”. I spent two days installing the database and another two day ...
Read More...

SQL Optimizer Part 8 - Display Order for SQL Alternatives
RichardTo Friday, January 30, 2009 6:31 AM

Written by Rene Woody

This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle. It explains the order in which the SQL stateme ...

Read More...

Optimizing SQL Part 7 – Rearranging the Driving Path
RichardTo Friday, January 16, 2009 5:49 AM
Written by Rene Woody

This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle. It covers the importance of finding t ...
Read More...

Optimizing SQL Part 6 – Using Oracle Optimization Hints when tuning SQL
RichardTo Friday, January 02, 2009 7:11 AM

Written by Rene Woody

This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle. It exp ...
Read More...

How to use Quest SQL Optimizer to Tune Complex SQL - A Real Life Example #1
RichardTo Friday, December 19, 2008 12:16 PM

Recently, I received an email from the presales support team. They asked me to help them tune three SQL statements for a benchmark database provided by a customer. Our presales support said that our SQL Optimizer was not providing any alternatives for two of these three complex SQL statements. I found two of these SQL statements were very complicated and I knew that there should be a lot of alternative SQL genera ...

Read More...

Optimizing SQL Part 5 – Table Join Syntax
RichardTo Friday, December 05, 2008 7:23 AM
Written by Rene Woody

This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle. It covers how to specify the table jo ...
Read More...

Optimizing SQL Part 4 – Optimizing SQL statements with a VIEW
RichardTo Friday, November 21, 2008 5:54 AM

Written by Rene Woody

This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle. It covers optimizing SQL statemen ...

Read More...

Optimizing SQL Part 3– Generating more SQL alternatives for simple SQL statements
RichardTo Thursday, November 06, 2008 8:10 AM

Written by Rene Woody

This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimize ...

Read More...

Optimizing SQL Part 2 – Generating fewer alternative SQL statements
RichardTo Friday, October 24, 2008 4:53 AM

Written by Rene Woody

This blog is a continuation of a series (view last blog on the Optimization Process) about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of

Read More...

Optimizing SQL Part 1 – The Optimization Process
RichardTo Friday, October 10, 2008 5:48 AM

Written by Rene Woody

This blog is the beginning of a series that will cover the optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle.
&l ...

Read More...

A Question from our Quest SQL Optimizer User
RichardTo Thursday, September 04, 2008 1:50 AM
Recently, we got a question from a customer:
“Why does adding a ||'' to the end of a key value improve performance... in this case significantly, this query runs in 187 milliseconds regularly where without the ||'' it takes minutes to run... This is the only modification in the result set from SQ ...
Read More...

Batch Optimizer Part 6 - Using Batch Optimization with Rule Based Optimizer
RichardTo Tuesday, August 12, 2008 6:32 AM

Written by Rene Woody

This blog is a continuation of a series about the Batch Optimizer in Quest SQL Optimizer for Oracle.

In the Batch Optimizer in Quest SQL Optimizer for Oracle you may notice that the options for selecting which SQL alternatives to execute by the batch process are ...
Read More...

A New Intelligent Test Run Function is under Research
RichardTo Friday, June 13, 2008 3:20 AM
  
A problem in the area of SQL optimization that has been around for a long time is the inaccuracy of the cost estimation of a SQL statement. A lot of people have the wrong conception that inaccurate cost estimations generated for a SQL statement by the database optimizer are caused by outdated statistics; whereas in fact, outdated or incorrect statistics is only one o ...
Read More...

Batch Optimizer Part 5 – Viewing the SQL alternatives and execution run time statistics
RichardTo Friday, May 23, 2008 4:07 AM
Written by Rene Woody
 
After a SQL statement has been optimized in the Batch Optimizer in Quest SQL Optimizer for Oracle, you can view the text of the SQL alternatives and the execution plans in the Tuning Lab module. If the original SQL statement and alternatives have been executed, you can view th ...
Read More...

Batch Optimizer Part 4 – Options Settings for the Batch Optimizer
RichardTo Friday, May 09, 2008 5:53 AM
Written by Rene Woody
This blog is a continuation of a series about the Batch Optimizer in Quest SQL Optimizer for Oracle. It covers the execution options settings for determining the criteria for selecting the best alternative, for terminating longer running SQL, and eliminating the effect of caching on the comparison ru ...
Read More...

Batch Optimizer Part 3 – Options Settings for the Batch Optimizer
RichardTo Friday, April 25, 2008 6:44 AM
Written by Rene Woody
 

This blog is a continuation of a series about the Batch Optimizer in Quest SQL Optimizer for Oracle. It covers the execution options settings that determine which SQL statements will be automatically executed by the Batch Optimizer process and the method used for their execution.
Read More...

Batch Optimizer Part 2 – Options Settings for the Batch Optimizer
RichardTo Thursday, April 10, 2008 10:05 PM
Written by Rene Woody
 
This blog is a continuation of a series about the Batch Optimizer in Quest SQL Optimizer for Oracle. The Batch Optimizer process is fully automated with t ...
Read More...

Batch Optimizer Part 1 – How the Batch Optimizer Works
RichardTo Friday, March 28, 2008 4:01 AM
Written by Rene Woody
 
We all know that it is important to create SQL statements that perform well in our database environment, but all too often, after creating a SQL statement that retrieves the correct results, the optimizing of the SQL statement is left for another time. Frequently, that time never arrives. Quest SQL ...
Read More...

How to use the Quest SQL Optimizer
RichardTo Tuesday, March 18, 2008 5:31 AM
Written by Rene Woody
 
Quest SQL Optimizer can do an extensive transformation of the syntax of a SQL statement while still maintaining the exact same result set. This exhaustive transformation can produce hundreds of SQL alternatives. So it is necessary to have some insight as how to find a SQL alternative that is better than your ...
Read More...

What about a Self-learning SQL Optimizer?
RichardTo Tuesday, October 09, 2007 4:45 AM

There are at least two database vendors are trying to build self-learning SQL optimizers. The idea is to use actual statistics from executed SQL statements to rectify the future cost estimation of the same or similar SQL statements. It seems like a good idea, but, you will find that their existing self-learning ...

Read More...

A SQL Performance History from AWR
RichardTo Thursday, September 13, 2007 2:51 PM
I have been working on SQL Tuning research for more than 10 years, but my focus has changed to time-series forecast technology in the last two years. Recently, Oracle’s AWR and other database vendor’s statistics/metrics repository have drawn my attention. The relatively low cost of keeping performance statistics in databases, combined wi ...
Read More...

How Quest SQL Optimizer works with Hints
RichardTo Tuesday, August 14, 2007 10:28 AM
Today database vendors are more willing to provide a means for the end user to influence the decision of which execution plan to use for a SQL statement. They provide this because database optimizers cannot guarantee that they the will generate the best execution plan for a given SQL statement. However, when you do apply Optimization Hints you ...
Read More...

Let me give you a hint on using database Optimization Hints - Part Three
RichardTo Friday, July 27, 2007 7:49 AM

Be sure to read

Read More...

Let me give you a hint on using database Optimization Hints - Part Two
RichardTo Friday, July 20, 2007 9:03 AM

To read part one in this series on O ...

Read More...

Let me give you a hint on using database Optimization Hints - Part One
RichardTo Friday, July 13, 2007 2:12 PM
Should you use Optimization Hints?
The use of Hints in your SQL statements will fix the execution plan so that Oracle Optimizer will not switch to a better (or a worse) execution plan when the database environment changes. Therefore, many people say, we should use H ...
Read More...

Quest Recursive SQL Transformation Technology
RichardTo Wednesday, June 20, 2007 4:58 AM

Quest Recursive SQL Transformation technology is an innovative AI technology that simulates human SQL transformation technique. It incorporates a set of transformation rules to transform SQL statements on a section-by-section basis. This replaces the trial and error method used by human to rewrite the syntax of a SQL statement. Each t ...

Read More...

From SQL Optimization Hints to Plan Instructions
RichardTo Wednesday, May 02, 2007 7:05 AM
Most database vendors provide optimization hints which enable a user to influence the decision the database SQL optimizer will make when determining which execution plan it will choose. Oracle provides a full set of optimization hints to help users to rectify an i ...
Read More...

Is SQL Optimization an Unsolvable Problem?
RichardTo Monday, April 02, 2007 12:27 PM

In

Read More...

Dummy SQL Transformation Rules?
RichardTo Thursday, March 01, 2007 10:33 AM

I have been asked many times that why there are some dummy SQL transformations/rewrites that look meaningless, but it works in certain situations.  Let me give you some examples that may help to explain what theory on behind of Quest SQL Optimizer.

Read More...

Transformation Rules Relating to Index Usage
RichardTo Friday, February 09, 2007 8:25 AM

In Quest SQL Optimizer, transformation rules relating to index usage are designed to guide the database SQL optimizer as to how it should use the indexes for a specific SQL statement.  Although those rules may familiar to most of SQL developers, but it is still worth to illustrate some commonly used rules for SQL beg ...

Read More...

How to control many table join
RichardTo Wednesday, January 03, 2007 3:42 PM
In my last blog, I use two tables join to illustrate the simple path control, now let’s use a three table join SQL statement to demonstrate a more complicated scenario. Let’s assume that A.key, B.key and C.key are all indexed.
Read More...

How to Control Two Tables Join Path?
RichardTo Thursday, December 07, 2006 3:06 PM

In old version of Oracle database, it is easy to control the join path by reordering the tables in table list after the FROM clause, but it is getting difficult to control the join path in today’s cost based SQL optimizer, I am going to introduce method that is applicable in most databases such as Oracle, Sybase, DB2 and SQL Server in the following:

To control a join path, we cannot tell the database SQL optimizer which path is the best one to select. Instead, we add something to the syntax of the SQL statement that causes an increase to the cost of the current join path selected by database SQL optimizer. Let’s take a look at the following example of two table join scenarios.

Read More...

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