MySQL partitioning - 파일 ???

불당   
   조회 3035  

g4_point를 다음과 같이 파티셔닝 해봤습니다.

ALTER TABLE g4_point
PARTITION BY RANGE ( TO_DAYS(po_datetime) ) (
PARTITION po2007 VALUES LESS THAN (TO_DAYS('2008-01-01')),
PARTITION po2008 VALUES LESS THAN (TO_DAYS('2009-01-01')),
PARTITION po2009 VALUES LESS THAN (TO_DAYS('2010-01-01')),
PARTITION po2010 VALUES LESS THAN (TO_DAYS('2011-01-01')),
PARTITION po2011 VALUES LESS THAN (TO_DAYS('2012-01-01')),
PARTITION po2012 VALUES LESS THAN (TO_DAYS('2013-01-01')),
PARTITION po2013 VALUES LESS THAN (TO_DAYS('2014-01-01')),
PARTITION po2014 VALUES LESS THAN (TO_DAYS('2015-01-01')),
PARTITION po2015 VALUES LESS THAN (TO_DAYS('2016-01-01')),
PARTITION po2016 VALUES LESS THAN (TO_DAYS('2017-01-01')),
PARTITION po2017 VALUES LESS THAN (TO_DAYS('2018-01-01')),
PARTITION po2018 VALUES LESS THAN (TO_DAYS('2019-01-01')),
PARTITION po2019 VALUES LESS THAN (TO_DAYS('2020-01-01')),
PARTITION po2020 VALUES LESS THAN (TO_DAYS('2021-01-01')),
PARTITION pmax VALUES LESS THAN MAXVALUE
);


파일은 아래와 같이 생깁니다.

파일명 뒤에 #파티션이름이 들어갑니다.

opencode]# ll g4_point*
-rw-rw---- 1 mysql mysql   163840 2016-08-13 00:16 g4_point#P#pmax.ibd
-rw-rw---- 1 mysql mysql   212992 2016-08-13 00:16 g4_point#P#po2007.ibd
-rw-rw---- 1 mysql mysql   393216 2016-08-13 00:16 g4_point#P#po2008.ibd
-rw-rw---- 1 mysql mysql   655360 2016-08-13 00:16 g4_point#P#po2009.ibd
-rw-rw---- 1 mysql mysql 12582912 2016-08-13 00:16 g4_point#P#po2010.ibd
-rw-rw---- 1 mysql mysql 17825792 2016-08-13 00:16 g4_point#P#po2011.ibd
-rw-rw---- 1 mysql mysql 19922944 2016-08-13 00:16 g4_point#P#po2012.ibd
-rw-rw---- 1 mysql mysql 17825792 2016-08-13 00:16 g4_point#P#po2013.ibd
-rw-rw---- 1 mysql mysql 13631488 2016-08-13 00:17 g4_point#P#po2014.ibd
-rw-rw---- 1 mysql mysql  9437184 2016-08-13 00:17 g4_point#P#po2015.ibd
-rw-rw---- 1 mysql mysql   720896 2016-08-13 00:16 g4_point#P#po2016.ibd
-rw-rw---- 1 mysql mysql   163840 2016-08-13 00:16 g4_point#P#po2017.ibd
-rw-rw---- 1 mysql mysql   163840 2016-08-13 00:16 g4_point#P#po2018.ibd
-rw-rw---- 1 mysql mysql   163840 2016-08-13 00:16 g4_point#P#po2019.ibd
-rw-rw---- 1 mysql mysql   163840 2016-08-13 00:16 g4_point#P#po2020.ibd
-rw-rw---- 1 mysql mysql     5200 2016-08-13 00:15 g4_point.frm
-rw-rw---- 1 mysql mysql      196 2016-08-13 00:15 g4_point.par



- opencode.co.kr -
불당 2016-08
ALTER TABLE g4_point
PARTITION BY RANGE ( TO_DAYS(po_datetime) ) (
PARTITION po2007 VALUES LESS THAN (TO_DAYS('2008-01-01')),
PARTITION po2008 VALUES LESS THAN (TO_DAYS('2009-01-01')),
PARTITION po2009 VALUES LESS THAN (TO_DAYS('2010-01-01')),
PARTITION po2010 VALUES LESS THAN (TO_DAYS('2011-01-01')),
PARTITION po2011 VALUES LESS THAN (TO_DAYS('2012-01-01')),
PARTITION po2012 VALUES LESS THAN (TO_DAYS('2013-01-01')),
PARTITION po2013 VALUES LESS THAN (TO_DAYS('2014-01-01')),
PARTITION po2014 VALUES LESS THAN (TO_DAYS('2015-01-01')),
PARTITION po2015 VALUES LESS THAN (TO_DAYS('2016-01-01')),
PARTITION po2016 VALUES LESS THAN (TO_DAYS('2017-01-01')),
PARTITION po2017 VALUES LESS THAN (TO_DAYS('2018-01-01')),
PARTITION po2018 VALUES LESS THAN (TO_DAYS('2019-01-01')),
PARTITION po2019 VALUES LESS THAN (TO_DAYS('2020-01-01')),
PARTITION po2020 VALUES LESS THAN (TO_DAYS('2021-01-01')),
PARTITION po2021 VALUES LESS THAN (TO_DAYS('2022-01-01')),
PARTITION po2022 VALUES LESS THAN (TO_DAYS('2023-01-01')),
PARTITION po2023 VALUES LESS THAN (TO_DAYS('2024-01-01')),
PARTITION po2024 VALUES LESS THAN (TO_DAYS('2025-01-01')),
PARTITION po2025 VALUES LESS THAN (TO_DAYS('2026-01-01')),
PARTITION po2026 VALUES LESS THAN (TO_DAYS('2027-01-01')),
PARTITION po2027 VALUES LESS THAN (TO_DAYS('2028-01-01')),
PARTITION po2028 VALUES LESS THAN (TO_DAYS('2029-01-01')),
PARTITION po2029 VALUES LESS THAN (TO_DAYS('2030-01-01')),
PARTITION po2030 VALUES LESS THAN (TO_DAYS('2031-01-01')),
PARTITION pmax VALUES LESS THAN MAXVALUE
);
불당 2016-08
효과는 amazing 입니다.
엄청나게 놀라운 성능효과 나옵니다.
하하핫...


제목Page 1/9
     
2014-05   100939   불당
2014-06   113400   불당
2015-11   47163   불당
2016-05   28313   불당
2011-12   184491   불당
2012-10   9547   불당
2016-08   2872   불당
2016-08   2147   불당
2016-08   2111   불당
2016-08   3036   불당
2016-08   3183   불당
2016-08   1691   불당
2016-08   1877   불당
2015-10   3102   불당
2015-10   2891   불당
2015-09   4081   불당
2015-09   2711   불당
2015-09   3115   불당
2015-09   2980   불당
2015-09   3879   불당
2015-09   3074   불당
2015-09   2804   불당
2015-09   3048   불당
2015-09   2523   불당
2015-09   2723   불당
2014-06   4992   불당