MySQL Forums
Forum List  »  Partitioning

by char partitioning
Posted by: michal trembacz
Date: June 25, 2007 03:59AM

I have huge table like 20mln records in 50 columns.
I want to partition this table by char field.

mysql> describe hist;
| Field | Type | Null | Key | Default | Extra |
| SHOP | char(20) | YES | MUL | NULL | |

So i have 20 different shops and they are like Wexford, Waterford etc and want to have one partition per one shop. Is it possible to do ? I saw few examples with ASCII() function but it takes only first character from string so 2 abovementioned shops will be in same partition what i want to avoid. Is there any function which make a integer hash from char field ? even taking 2 first characters from shop name would help me. regards


Options: ReplyQuote

Written By
by char partitioning
June 25, 2007 03:59AM
June 25, 2007 06:33AM
June 25, 2007 07:05AM
June 25, 2007 09:45AM

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.