Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Under what circumstances should one use a non-equijoin?
As a hypothetical example, how about:
where stock.next_delivery_date > order_line.order_date + 7 and stock.stock_code = order_line.stock_code
Although the stock_code equi-join is pk/fk, the date predicate is non-key and is a non-equijoin, but does not necessarily suggest a bad design.
-- Regards Jonathan Lewis http://www.oracle.com/technology/community/oracle_ace/ace1.html#lewis The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html <dananrg_at_yahoo.com> wrote in message news:1149196317.088654.221960_at_i39g2000cwa.googlegroups.com...Received on Thu Jun 01 2006 - 16:37:25 CDT
> It is good or bad practice to perform non-equijoins - e.g. to do table
> joins where there is no formal foreign key to relate two tables.
>
> Under what circumstances is it necessary or desirable to perform
> non-equijoins? Can someone give a few examples?
>
> If I have to perform a non-equijoins, does this mean I'm using a poorly
> designed RDBMS?
>