Re: Using bind variables for multiple values

From: Robert Klemme <>
Date: Mon, 24 Nov 2008 07:31:31 -0800 (PST)
Message-ID: <>

On Nov 24, 4:12 pm, Shakespeare <> wrote:
> Robert Klemme schreef:
>  > I wondered: why is it that the join version does a full table scan but
>  > the IN ( subselect ) version does not?
>  From a logical point of view I would say: because what you ask for is
> something different:
> - For an IN clause, 1 occurence is enough to decide if there's a match
> - For a join, you specifically ask for all matching occurences.

Yes, that's certainly the major difference. But why does this lead the CBO to suddenly change its idea of the table variable's cardinality? I could not find anything in the trace that would explain this. Of course it could be that the CBO simply does not trace that bit of information...

Kind regards

robert Received on Mon Nov 24 2008 - 09:31:31 CST

Original text of this message