MySQL Forums
Forum List  »  Partitioning

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

Hi,
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

Michal

Options: ReplyQuote


Subject
Views
Written By
Posted
by char partitioning
3815
June 25, 2007 03:59AM
2571
June 25, 2007 06:33AM
2579
June 25, 2007 07:05AM
2537
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.