Re: Functions and Relations
From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 21 Nov 2006 11:17:21 -0800
Message-ID: <1164136641.739367.248440_at_j44g2000cwa.googlegroups.com>
Date: 21 Nov 2006 11:17:21 -0800
Message-ID: <1164136641.739367.248440_at_j44g2000cwa.googlegroups.com>
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,
create index Ti on T(x,y);
insert into t
select * from T
y integer,
);
select i/1000, mod(i,1000)
from Integers where i < 100000
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 - 20:17:21 CET