MySQL Forums
Forum List  »  Partitioning

Re: partition by varchar - random behavior?
Posted by: Rick James
Date: January 05, 2016 10:55PM

I would _guess_ it is doing some kind of hash. The hash probably scans all the bytes. After getting a numeric hash, then it does modulo the number of partitions. Well, with only 2 distinct input values, there is something like a 50-50 chance of tossing both M and F into the same bucket.

Abandon partitioning by KEY(gender). If you really want gender, see if there is LIST(gender).

What do you hope to gain by partitioning? Perhaps spreading the data across the nodes?

Options: ReplyQuote


Subject
Views
Written By
Posted
1017
January 02, 2016 02:07PM
Re: partition by varchar - random behavior?
506
January 05, 2016 10:55PM


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.