mysql where condition -
I'm interested in that situation; If I type:
choose from table_name where insert_date> Text like '2010-01-03' and '% friend%';
is different from:
Select from table_name * where the text '% friend%' and insert_date & gt; '2010-01-03';
I mean that the table is very large, there are many rows and if mysql maintains a consistent record of the condition "where insert_date> '2010-01-03'" find it first and then For the word "friend" this record may be faster than the "friends" rows and compared to the date fields.
Is it important to write where smart ways, or mysql's analysis condition and rehabilitation where again writes in the best way?
Thanks
No, two sections should be equivalent.
The order of the columns in an index however the case is.
If you think the adapter is using the wrong index, you can give it one though not often, though, it is a good reason to use the index selected to use it, So, unless you know exactly what you are doing, then by suggesting the optimizer, things will not often get worse.
Comments
Post a Comment