MySQL partitioning - 파일 ???

불당   
   조회 2901  

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
     
06-02   770   불당
2016-05   26628   불당
2016-06   24755   불당
2015-05   75574   불당
2016-07   35538   불당
2012-10   9439   불당
2016-08   2722   불당
2016-08   2010   불당
2016-08   1963   불당
2016-08   2902   불당
2016-08   2980   불당
2016-08   1597   불당
2016-08   1698   불당
2015-10   2972   불당
2015-10   2809   불당
2015-09   3922   불당
2015-09   2609   불당
2015-09   3012   불당
2015-09   2884   불당
2015-09   3718   불당
2015-09   2971   불당
2015-09   2695   불당
2015-09   2928   불당
2015-09   2431   불당
2015-09   2618   불당
2014-06   4901   불당