| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Functions and Relations
Aloha Kakuikanu wrote:
> Now returning to the main discussion. The query in question:
>
> select x,y from T
> where x=y and y=f(x)
>
> ....
More realistic example:
create table T (
x integer,
y integer,
);
create index Ti on T(x,y);
insert into t
select i/1000, mod(i,1000)
from Integers where i < 100000
select * from T
where x = 1 and y = x+1
Is your SQL database of choice able to find the access path where `x=1` is evaluated first, then it is joined with `y = x+1` and finally a tuple from T is fetched by index range scan? Received on Tue Nov 21 2006 - 13:17:21 CST
![]() |
![]() |