Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Strange behaviour of optimizer
I have the following tables:
MAIN(docnum number(10) primary key, heading varchar2(4)...) TEXT(docnum number(10) primary key, inhalt varchar2(4000))
"heading" is normally index, "inhalt" is indexed with a context.ctxsys index.
Searches like
select docnum from MAIN where heading='...'
select docnum from TEXT where contains(inhalt,'...')>0;
work fine and fast. However the following query take minutes:
select docnum from MAIN where heading='...' or docnum IN ( select docnum from TEXT where contains(inhalt,'any text')>0);
I am using Oracle 8k and the CBO (all tables and indexes are analyzed). Any idea why this happens ?
Andreas
-- _\\|//_ (' O-O ') ------------------------------ooO-(_)-Ooo-------------------------------------- Andreas Jung, Saarbr|cker Zeitung Verlag und Druckerei GmbH Saarbr|cker Daten-Innovations-Center Untert|rkheimerstra_e 15, D-66103 Saarbr|cken, Germany Phone: +49-(0)681-502-1528, Fax: +49-(0)681-502-1509 Email: ajung_at_sz-sb.de (PGP key available) -------------------------------------------------------------------------------Received on Fri Jun 23 2000 - 06:08:13 CDT