MySQL 파티션

IT위키
Dbeaver (토론 | 기여)님의 2023년 2월 26일 (일) 01:40 판 (새 문서: == 파티션 조회 == <syntaxhighlight lang="sql"> select * from information_schema.partitions where table_name = '테이블명' </syntaxhighlight> == 파티션 추가 == <syntaxhighlight lang="sql"> alter table '테이블명' add partition ( PARTITION `파티션명` VALUES LESS THAN (파티션 값) } </syntaxhighlight> == 파티션 삭제(drop) == <syntaxhighlight lang="sql"> ALTER TABLE `테이블명` DROP PARTITION '파티션명' </syntaxhighlight> == 파티션 비...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

파티션 조회[편집 | 원본 편집]

select
*
from information_schema.partitions
where table_name = '테이블명'

파티션 추가[편집 | 원본 편집]

alter table '테이블명' add partition 
(
    PARTITION `파티션명` VALUES LESS THAN (파티션 )
}

파티션 삭제(drop)[편집 | 원본 편집]

ALTER TABLE `테이블명` DROP PARTITION '파티션명'

파티션 비우기(truncate)[편집 | 원본 편집]