oracle - same query but different plan in 11g and 12c
问题 This Question is relative to this question. This is code i try to use in 12c SELECT * FROM DMProgDate_00001 WHERE 1=1 AND ProgressOID IN ( SELECT P.OID FROM ( SELECT OID FROM ( SELECT A.OID, ROWNUM as seqNum FROM ( SELECT OID FROM DMProgress_00001 WHERE 1=1 AND Project = 'Moho' AND Phase = 'Procurement' AND Displine = 'Q340' ORDER BY actCode ) A WHERE ROWNUM <= 20 ) WHERE seqNum > 0 ) P ); result 11g : under 1 sec 12c : over 8 sec This is the query plan in 11g This is the query plan in 12c