MySQL Forums
Forum List  »  Partitioning

Re: Partition problem (Data striping)
Posted by: Mattias Jonsson
Date: April 13, 2012 08:08AM

For MyISAM it should be something like this:

CREATE TABLE t
(a ...,
PRIMARY KEY (a,...))
ENGINE = MyISAM
PARTITION BY HASH (a)
(PARTITION p0 DATA DIRECTORY = '/disk0/d0' INDEX DIRECTORY = '/disk0/i0',
PARTITION p1 DATA DIRECTORY = '/disk1/d1' INDEX DIRECTORY = '/disk1/i1',
PARTITION p2 DATA DIRECTORY = '/disk2/d2' INDEX DIRECTORY = '/disk2/i2',
PARTITION p3 DATA DIRECTORY = '/disk3/d3' INDEX DIRECTORY = '/disk3/i3',
PARTITION p4 DATA DIRECTORY = '/disk4/d4' INDEX DIRECTORY = '/disk4/i4',
PARTITION p5 DATA DIRECTORY = '/disk5/d5' INDEX DIRECTORY = '/disk5/i5');

Also note that you currently cannot alter DATA/INDEX directory. You have to set them up at CREATE (or do unsupported stuff like manually move the data/index files and symlink to them).

Yet another note is that table scanning is done one partition at a time, but ordered (index) reads may give you a striping access pattern.

Options: ReplyQuote


Subject
Views
Written By
Posted
3095
April 10, 2012 07:09PM
Re: Partition problem (Data striping)
2120
April 13, 2012 08:08AM


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.