MySQL Forums
Forum List  »  InnoDB

Re: MySQL 5.5.8 - Configuration Settings Suggestions
Posted by: Rick James
Date: July 04, 2012 06:39AM

This construct scares me:
IN (1, NULL)
NULL is generally not treated as a "value" that can be compared.

You have a construct like this:
a AND b OR c
Please add parentheses. That is equivalent to
(a AND b) OR c
but I am worried that you meant
a AND (b OR c)

Please use [ code ] and [ /code ] without spaces around EXPLAIN output.

NOW() BETWEEN from AND to
is especially hard to optimize; INDEX(from, to) and INDEX(to, from) are not likely to help much, if any. (The EXPLAIN will say wither it is being used in the example you try.)

> it is reduced to 1966 from 2002
If that is "Rows", that does not say anything, since it is just an estimate.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MySQL 5.5.8 - Configuration Settings Suggestions
1102
July 04, 2012 06:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.