Re: Optimization question: Unrolling subquery into IN clause

From: Wolfram Roesler <>
Date: Fri, 23 Oct 2009 07:42:15 +0000 (UTC)
Message-ID: <>

Randolf Geist <> wrote in

> 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