Hi,
Does MySQL optimizer changes the execution plan based on the WHERE condition ? If I add one extra column for the comparison in WHERE condition , does it affect query execution plan ?
Thanks, Sunil
Hi,
Does MySQL optimizer changes the execution plan based on the WHERE condition ? If I add one extra column for the comparison in WHERE condition , does it affect query execution plan ?
Thanks, Sunil
Use EXPLAIN <your query>
to tell you what the system will do. Adding an extra column can definitely change the way it's interpreted, however. There's a page on using EXPLAIN
in the MySQL docs: http://dev.mysql.com/doc/refman/5.0/en/using-explain.html