MySQL Forums
Forum List  »  Partitioning

Re: RANGE Partitioning - Questions/Suggestions
Posted by: jey Razack
Date: November 16, 2005 08:27AM

> CREATE TABLE `tr` (
> `id` int(11) default NULL,
> `name` varchar(50) default NULL,
> `purchased` date default NULL
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1
> PARTITION BY RANGE (YEAR(purchased)) (
> PARTITION p0 VALUES LESS THAN (1980) ENGINE =
> MyISAM,
> AUTOPARTITION ON p(n+1) VALUES YEAR(purchased)+1
> LIMIT 200 ENGINE = MyISAM
> )
>
> Syntax explanation for example AUTOPARTITION:
>


Just to be cautioned:

In real production environment the partitions is usually based on the day (YYYYMMDD) key.
p(n+1) could be p(YYYYMMDD+1) or could be date + 1.

Regards..Jey



Edited 1 time(s). Last edit at 11/16/2005 08:28AM by jey Razack.

Options: ReplyQuote


Subject
Views
Written By
Posted
3743
November 02, 2005 06:36AM
Re: RANGE Partitioning - Questions/Suggestions
2437
November 16, 2005 08:27AM


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.