Re: Optimization question: Unrolling subquery into IN clause

From: Wolfram Roesler <wr_at_spam.la>
Date: Fri, 23 Oct 2009 07:42:15 +0000 (UTC)
Message-ID: <Xns9CAD62B714DDBwrgrpde_at_news.albasani.net>



Randolf Geist <mahrah_at_web.de> wrote in news:badd2686-0166-47fa-a260-bfd7c7c43d01_at_e34g2000vbm.googlegroups.com:

> So if the TAB2.COL3 column is skewed and the value "L" is only showing
> up 20 times, then you need to tell the optimizer about that and add a
> histogram on this column, if it's not there already.

That was the reason of the problem. I fixed the histograms on the column in question, and now my query finishes in less than a second. For the version with bind variables, this means a speed-up by a factor of 1000.

The problem is thus completely understood and solved. Thanks to all who helped!

Best regards
W. Rösler Received on Fri Oct 23 2009 - 02:42:15 CDT

Original text of this message