An Oracle DB programmer reviewed a query that I wrote and told me that
putting constants at the beginning of the query would make it slower. I
thought I'd go to the experts on MySQL and be told the truth one way of
the other.

Example query:

SELECT
        TABLE1.COL,
        TABLE2.COL
FROM
        TABLE1,
        TABLE2
WHERE
        TABLE1.COL='CONSTANT' 
AND
        TABLE1.COL=TABLE2.COL

                [       OR      ]

SELECT
        TABLE1.COL,
        TABLE2.COL
FROM
        TABLE1,
        TABLE2
WHERE
        TABLE1.COL=TABLE2.COL
AND
        TABLE1.COL='CONSTANT'

I know that indexes are important and such, the above is just an example
to give some visual.

Thanks for any help you can offer.

Rob.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to