Home » Performance » MySQL » char based partitioning
char based partitioning [message #1476] Mon, 25 June 2007 09:02 Go to next message
trompele  is currently offline trompele
Messages: 1
Registered: June 2007
Location: Ireland
Junior Member
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
Re: char based partitioning [message #1488 is a reply to message #1476 ] Tue, 26 June 2007 10:35 Go to previous message
noqlew2  is currently offline noqlew2
Messages: 6
Registered: June 2007
Location: New Jersey
Junior Member
are you talking about mysql's substring?

http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
Previous Topic:InnoDB Backup
Next Topic:Tuning server for very large (250GB) data sets
Goto Forum:
  


Current Time: Fri Jul 10 06:56:02 EDT 2009

Total time taken to generate the page: 0.00574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.