Re: SQL performance - optimizer question
From: Kevin Neel <k-neel_at_nwu.edu>
Date: 27 Jan 1994 22:40:09 GMT
Message-ID: <2i9fs9$1ss_at_anaxagoras.ils.nwu.edu>
Date: 27 Jan 1994 22:40:09 GMT
Message-ID: <2i9fs9$1ss_at_anaxagoras.ils.nwu.edu>
In article <MLOENNRO.94Jan27215220_at_pisa.se.oracle.com> Magnus Lonnroth,
mloennro_at_se.oracle.com writes:
:select val1, val2
:from MYTABLE
:where rowid in ( select rowid from MYTABLE where key1 = :key1
: union
: select rowid from MYTABLE where key2 = :key2
: union
: select rowid from MYTABLE where key3 = :key3 )
Of course, you still need to add the original conditions as AND clauses to the outermost SELECT. And if all three can be null at the same time, then you'll need to UNION in that case. Received on Thu Jan 27 1994 - 23:40:09 CET