MySQL Forums
Forum List  »  Partitioning

Question about adding partitions to a table?
Posted by: Warrick Wilson
Date: January 03, 2008 04:30PM

I was trying figure out how to improve performance on a 5.0.22 database and ran across something talking about partitioning, and I've spent the last two hours reading the forum and the articles, etc. Sounds VERY helpful.

From what I've been reading, I keep seeing examples that having something like "PARTITION p3 VALUES LESS THAN MAXVALUE" at the end. That looks like a "catch-all" partition for anything over the previous partitions.

If I'm wanting to add a partition at a later date (in my case, I'm looking at separating logging data by months), then I'm assuming that I should NOT use the MAXVALUE partition, since one of the documentation pages says that you can only add partitions at the end. Am I understanding that right?

In a similar vein, then, if I had a table with the following partitions:

PARTITION BY RANGE( region_code ) (
PARTITION p0 VALUES LESS THAN (64),
PARTITION p1 VALUES LESS THAN (128),
PARTITION p2 VALUES LESS THAN (192)
);

What would happen if I INSERTed a record where the region_code was 193? Does it go somewhere? Do I get an error? And if it goes into the table somehow, would it automagically get put into the proper partition if I later came along and added a partition for VALUES LESS THAN (200), say?

Thanks!

Options: ReplyQuote


Subject
Views
Written By
Posted
Question about adding partitions to a table?
4945
January 03, 2008 04:30PM


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.