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
6830
K T
May 07, 2014 04:39PM
Re: MySql Partitioning problem (bug?)
1315
May 09, 2014 11:59PM
1270
K T
May 10, 2014 03:41PM
1223
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.