Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Order of execution of Select clauses
Pria wrote:
> Hi All,
>
> Please correct me if i am wrong.
>
> Internally, the order of execution for a SELECT statement is as
> follows:
> FROM clause
> WHERE clause
> SELECT clause
> ORDER BY clause
> and Oracle allows Order by the table columns that are not included in
> the SELECT clause.
>
> If Order By clause is executed after select clause in select statement,
> then how does Oracle Order by columns that are not included in the
> SELECT clause internally.
I recommend that you concentrate more on writing good SELECT statements.
Let the developers for the RDBMS products concentrate more on how to execute it.
Understanding explain plans and different techniques is important to a point. Mr. Lewis has a new book out ( haven't read it yet, not trying to push it ) that attempts to explain how the oracle optimizer works ( as I understand it ).
That book along with several of the classics on writing good SQL are perhaps the right place to spend time looking at. Received on Fri Feb 10 2006 - 19:33:27 CST