Using {+FIRST_ROWS} with FIRST 1 makes any sense?
Posted in 2016
Topics: General Discussion
KRASHAN — — source: IIUG Forums & Mailing Lists
Hi Does using 'SELECT {+FIRST_ROWS} FIRST 1 ...' is better then 'SELECT FIRST 1 ...' when we do not use order by? Explain show better cost but db engine should use the same best execution plan in both cases.
↪ replying to KRASHAN
BENJAMIN — — source: IIUG Forums & Mailing Lists
If the plan is the same then there is no difference to the end result. I wouldn't like to give a definitive answer on this because the optimiser is a complex beast but I'd say the directive is redundant. If the cost estimate changes this is only a difference in how the optimiser evaluates the possible plans before making its choice. It could only change the actual plan used if there was an alternative plan with similar costs. Ben.