RE: playing around with LEADING hint - need input

From: Kenneth Naim <kennethnaim_at_gmail.com>
Date: Tue, 28 Feb 2012 10:47:53 -0500
Message-ID: <027501ccf630$5b5f7f30$121e7d90$_at_gmail.com>



As a general rule, you want to process the table the will filter the most rows first so any tables with where conditions that would eliminate the greatest number of rows are good candidates for the leading hint and especially for the first table in that hint. For The second table I looked at tables that are joined to the first table that again provide the greatest opportunity for filter out the greatest number of rows and so on. If tables and filter are similar in counts and filters you'll have to logically deduce and/or test them out to figure which is more optimal.

Ken

-----Original Message-----

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Taylor, Chris David
Sent: Tuesday, February 28, 2012 9:40 AM To: 'oracle-l_at_freelists.org'
Subject: playing around with LEADING hint - need input

So, I'm working on a particularly quarrelsome query and I was looking up things I might could throw at it (to see what sticks if you will - call it 'brainstorming') and I looked up the LEADING hint. I'm wondering how to quantitatively determine "how" to use the LEADING hint in the most meaningful way.
QUESTION:
How can I determine which tables should be passed to the LEADING hint and lead to better query execution? Obviously I can continue down the brainstorming path and throw things at it until I *perhaps* hit a combination that works, but obviously that is exceptionally inefficient.

Any suggestions/tips for the specific question?

Thanks,

Chris Taylor

"Quality is never an accident; it is always the result of intelligent effort."
-- John Ruskin (English Writer 1819-1900)

The views and opinions expressed herein are my own and do not necessarily reflect the views of Ingram Industries, its affiliates, its subsidiaries or its employees.

--

http://www.freelists.org/webpage/oracle-l


Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4837 - Release Date: 02/28/12


Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4837 - Release Date: 02/28/12

--

http://www.freelists.org/webpage/oracle-l Received on Tue Feb 28 2012 - 09:47:53 CST

Original text of this message