SQL Performance (MOSC)

MOSC Banner

ORDER BY usage and the optimizer

edited Apr 19, 2014 12:00PM in SQL Performance (MOSC) 5 commentsAnswered

Does Oracle know that a table is sorted by a specific column without using the ORDER BY in the table create?  In other words, lets say I create a new zipcode table from two other tables which are both ordered by zipcode.  If I don't put an explicit ORDER BY in the table create, it will still be ordered properly because the input tables were ordered.  But should I put an ORDER BY in anyway so the optimizer explicitly knows about the sorting?  Or is the optimizer smart enough to understand this?  Or does the optimizer figure this out when

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center