tag:blogger.com,1999:blog-14455177.post115211159472825345..comments2024-03-07T18:57:25.977+01:00Comments on Mikael Ronstrom: PARTITION by a date columnMikael Ronstromhttp://www.blogger.com/profile/07134215866292829917noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-14455177.post-39610496233988912542012-10-29T00:02:08.646+01:002012-10-29T00:02:08.646+01:00I searched every resource on the net, even mysql o...I searched every resource on the net, even mysql official site. But I couldn't found any solution for error "#1503 - A PRIMARY KEY must include all columns in the table's partitioning function"<br /><br />But your explanation helped to me finally. Thank you very much!..Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-14455177.post-30480362352056590892010-07-21T14:01:30.220+02:002010-07-21T14:01:30.220+02:00Hi Kumar,
Can you detail what kind of hardware...Hi Kumar,<br /><br /> Can you detail what kind of hardware is available to you?<br /><br />AbbasAbbas Ahmedhttps://www.blogger.com/profile/12000935116345612935noreply@blogger.comtag:blogger.com,1999:blog-14455177.post-34846061492850037732008-05-05T08:35:00.000+02:002008-05-05T08:35:00.000+02:00Hi MikaelI am looking for a disk based mysql clust...Hi Mikael<BR/>I am looking for a disk based mysql cluster for my old school that can use some economic hardware and also where speed is not exactly a need...is there a how to that you would recommend for this??Kumar Narayananhttps://www.blogger.com/profile/04233164647118432802noreply@blogger.comtag:blogger.com,1999:blog-14455177.post-7267604266055167582007-10-18T07:01:00.000+02:002007-10-18T07:01:00.000+02:00Having to have my partition column be in every sin...Having to have my partition column be in every single unique key was causing me pain on a table which had an auto_increment column that I couldn't do without, where I wanted to partition on a date field. I thought I was screwed until I discovered that I could simply extend my primary key definition to include the date column along with the auto_increment:<BR/><BR/>CREATE TABLE stuff<BR/>(<BR/> id integer auto_increment,<BR/> gmt_day integer,<BR/> primary key(id, gmt_day)<BR/>)<BR/>PARTITION by range(gmt_day)<BR/>(<BR/> PARTITION older values less than (13756),<BR/> PARTITION sep07 values less than (13786),<BR/> PARTITION newer values less than maxvalue<BR/>);<BR/><BR/>This may or may not work for you, but it certainly got me out of a spot of bother.<BR/><BR/>5.1.22-rcAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-14455177.post-29180471995960430252007-09-07T20:55:00.000+02:002007-09-07T20:55:00.000+02:00please correct your script:CREATE TABLE t1 (a date...please correct your script:<BR/><BR/>CREATE TABLE t1 (a date)<BR/>PARTITION BY RANGE(TO_DAYS(a))<BR/>(<BR/>PARTITION p3xx VALUES LESS THAN (TO_DAYS('2004-01-01')<B>)</B>,<BR/>PARTITION p401 VALUES LESS THAN (TO_DAYS('2004-02-01')<B>)</B>,<BR/>PARTITION p402 VALUES LESS THAN (TO_DAYS('2004-03-01')<B>)</B>,<BR/><BR/>...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-14455177.post-1169022275678010022007-01-17T09:24:00.000+01:002007-01-17T09:24:00.000+01:00This works perfectly for partitioning per month bu...This works perfectly for partitioning per month but is limited for a partition per day. <BR/><BR/>The max number of partition authorized by MySQL is 1024 (see Mysql manual: "16.5 Restrictions and limitations on MySQL partitioning"). Therefore a partition per day could only be created on less than three years(3*365=1095).<BR/><BR/>Sebastien Chaoulli<BR/>schaoulli@yahoo.frAnonymousnoreply@blogger.com