MySQL Forums
Forum List  »  Partitioning

Re: MySql Partitioning problem (bug?)
Posted by: Rick James
Date: May 09, 2014 11:59PM

You have discovered a reason why only RANGE partitioning is useful.

EXPLAIN is not at fault. It would take some smarts to understand that
WHERE test_id BETWEEN 1 AND 999
in only integers, and
(test_id DIV 1000)
would always generate "0" for those integers.

MySQL's partition pruning code is not up to that degree of intelligence.

And yet your Query 2 shows that it is even smart enough to do that, plus handle OR.

I suggest you post a bug (bugs.mysql.com), but rephrase it thus:
"If the pruning software can handle Query 2, why can't it handle Query 1?"

Options: ReplyQuote


Subject
Views
Written By
Posted
7254
K T
May 07, 2014 04:39PM
Re: MySql Partitioning problem (bug?)
1561
May 09, 2014 11:59PM
1499
K T
May 10, 2014 03:41PM
1433
K T
May 10, 2014 03:44PM


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.