I dont understand what do you mean exactly. If what you are saying is
in (1, 2, 3)
is same as
1 or 2 or 3
then yes it is correct but in a query plan.
Or you mean in the query plan you see a query is decomposed into several and concatenated at the end?
What I said an in-list is not same as OR in CBO terms. An in-list iterator is not resolved as a in (***) as that using RBO
I think we have some missunderstanding, when I said CBO uses inlist or OR depends I mean they are not resolved the same.
regarding concatenation
Using CBO it always tries to use inlist, at least from 9i upwardsCode:explain plan for select * from emp where deptno in (10, 20); SQL> explain plan for select * from emp where deptno in (10, 20); Explained. SQL> @plan PLAN_TABLE_OUTPUT ---------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | ---------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | | | | | 1 | CONCATENATION | | | | | | 2 | TABLE ACCESS BY INDEX ROWID| EMP | | | | |* 3 | INDEX UNIQUE SCAN | EMP_IDX1 | | | | | 4 | TABLE ACCESS BY INDEX ROWID| EMP | | | | |* 5 | INDEX UNIQUE SCAN | EMP_IDX1 | | | | ---------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 3 - access("EMP"."DEPTNO"=20) 5 - access("EMP"."DEPTNO"=10) Note: rule based optimization




Reply With Quote