Re: Execution Order of SQL Query

From: Bart <ordabber_at_my-deja.com>
Date: 20 Oct 2001 15:19:47 -0700
Message-ID: <76b555d9.0110201419.5fc0ff92_at_posting.google.com>


> > I just wanted to know that what is the execution order of the queries
> > in FROM and WHERE Clause. I mean is it make any difference if I
> > mention any table first or at last in FROM Clause and similarly for
> > WHERE Clause. Your comments would be appreciated and will be helpful
> > for me to write performance oriented queries.
> >
> > Regards
> > Satya

The order in the WHERE clause doesn't matter. If there is an index where the first fields are present in the where clause, it will be used, even if the order in the where clause is different. It's the order in the index that makes the difference.

Bart. Received on Sun Oct 21 2001 - 00:19:47 CEST

Original text of this message