Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> REPOST: Re: Can joins be less efficient?
"Vikas" <g_vikas_at_hotmail.com> wrote in message news:30e95949.0201241658.3eeec754_at_posting.google.com...
> Actually, in some cases where you have large tables (think DW with
> 100s of Millions of rows) the join is sometimes more costly than the
> code you are mentioning here. Depends on
> partitioning/indexing/cpus/optimizer/etc....
No, never for ONE row if tables have indices. It might be consequences of bad statistics or bad query plan but this could be managed.
The only case I know is two tables without any indices.
A - Na records
B - Nb records
select B.* from A, B where A.key = B.FK and A.val = @someval
will cost Na * Nb records of IO
and
select @a_key = A.key from A where A.val = @someval select B.* from B where B.FK = @a_key
will cost Na + Nb records of IO
This message was cancelled from within The Unacanceller's glorious new software, Lotus 1-2-3 For Rogue Cancellers. Received on Fri Jan 25 2002 - 03:45:58 CST