hi everyone
i'm doing a work on optimizing db-queries.
my test-db has the following tables:
create table r (a int, b int);
create table s (a int, d int, e int),
create table t (d int, f int);
these are filled with 1 million pseudorandom numbers.
my query is as follows:
select *
from r,s,t
where r.a=s.a and s.d=t.d;
with no optimization the query has about 30s.
after i inserted an index on r(a) and executed runstats on r, the explain plan gives me a result which uses factor 200'000 less timerons. the query whatsoever has around 8 min to deliver a result.
does anybody know what i do wrong, or what the promlem is?
thanks
i'm doing a work on optimizing db-queries.
my test-db has the following tables:
create table r (a int, b int);
create table s (a int, d int, e int),
create table t (d int, f int);
these are filled with 1 million pseudorandom numbers.
my query is as follows:
select *
from r,s,t
where r.a=s.a and s.d=t.d;
with no optimization the query has about 30s.
after i inserted an index on r(a) and executed runstats on r, the explain plan gives me a result which uses factor 200'000 less timerons. the query whatsoever has around 8 min to deliver a result.
does anybody know what i do wrong, or what the promlem is?
thanks