MySQL Forums
Forum List  »  Partitioning

Re: Am I doing this correctly?
Posted by: Jim Buckley Barrett
Date: November 29, 2013 06:22AM

Correction to my correct.

ALTER TABLE tblcustomer
PARTITION BY RANGE ( YEAR(CreationDate) )
SUBPARTITION BY HASH ( MONTH(CreationDate) ) (
PARTITION y2010 VALUES LESS THAN (2010) (
SUBPARTITION y2010mJan,
SUBPARTITION y2010mFeb,
SUBPARTITION y2010mMar,
SUBPARTITION y2010mApr,
SUBPARTITION y2010mMay,
SUBPARTITION y2010mJune,
SUBPARTITION y2010mJuly,
SUBPARTITION y2010mAug,
SUBPARTITION y2010mSep,
SUBPARTITION y2010mOct,
SUBPARTITION y2010mNov,
SUBPARTITION y2010mDec
),
PARTITION y2011 VALUES LESS THAN (2011) (
SUBPARTITION y2011mJan,
SUBPARTITION y2011mFeb,
SUBPARTITION y2011mMar,
SUBPARTITION y2011mApr,
SUBPARTITION y2011mMay,
SUBPARTITION y2011mJune,
SUBPARTITION y2011mJuly,
SUBPARTITION y2011mAug,
SUBPARTITION y2011mSep,
SUBPARTITION y2011mOct,
SUBPARTITION y2011mNov,
SUBPARTITION y2011mDec
),
PARTITION y2012 VALUES LESS THAN (2012) (
SUBPARTITION y2012mJan,
SUBPARTITION y2012mFeb,
SUBPARTITION y2012mMar,
SUBPARTITION y2012mApr,
SUBPARTITION y2012mMay,
SUBPARTITION y2012mJune,
SUBPARTITION y2012mJuly,
SUBPARTITION y2012mAug,
SUBPARTITION y2012mSep,
SUBPARTITION y2012mOct,
SUBPARTITION y2012mNov,
SUBPARTITION y2012mDec
),
PARTITION y2013 VALUES LESS THAN (2013) (
SUBPARTITION y2013mJan,
SUBPARTITION y2013mFeb,
SUBPARTITION y2013mMar,
SUBPARTITION y2013mApr,
SUBPARTITION y2013mMay,
SUBPARTITION y2013mJune,
SUBPARTITION y2013mJuly,
SUBPARTITION y2013mAug,
SUBPARTITION y2013mSep,
SUBPARTITION y2013mOct,
SUBPARTITION y2013mNov,
SUBPARTITION y2013mDec
),
PARTITION y2014 VALUES LESS THAN (2014) (
SUBPARTITION y2014mJan,
SUBPARTITION y2014mFeb,
SUBPARTITION y2014mMar,
SUBPARTITION y2014mApr,
SUBPARTITION y2014mMay,
SUBPARTITION y2014mJune,
SUBPARTITION y2014mJuly,
SUBPARTITION y2014mAug,
SUBPARTITION y2014mSep,
SUBPARTITION y2014mOct,
SUBPARTITION y2014mNov,
SUBPARTITION y2014mDec
),
PARTITION yMax VALUES LESS THAN MAXVALUE (
SUBPARTITION y2015mJan,
SUBPARTITION y2015mFeb,
SUBPARTITION y2015mMar,
SUBPARTITION y2015mApr,
SUBPARTITION y2015mMay,
SUBPARTITION y2015mJune,
SUBPARTITION y2015mJuly,
SUBPARTITION y2015mAug,
SUBPARTITION y2015mSep,
SUBPARTITION y2015mOct,
SUBPARTITION y2015mNov,
SUBPARTITION y2015mDec
));

Why did I have to add my field 'CreationDate' to the unique key?

Jim

Options: ReplyQuote


Subject
Views
Written By
Posted
2265
November 29, 2013 05:03AM
Re: Am I doing this correctly?
1291
November 29, 2013 06:22AM
1403
November 30, 2013 02:18PM
1204
December 04, 2013 12:38AM
1254
December 05, 2013 03:48AM
1305
December 05, 2013 10:21AM
1235
December 10, 2013 09:49AM
1276
December 05, 2013 03:51AM


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.