Mysql 무중단 index 명령어
·
개발/PERCONA
서비스 중에 index를 추가해야 하는 경우가 생기는데 percona의 pt-online-schema-change 를 통해 락 없이 추가할 수 있다. $ brew install percona-toolkit $ pt-online-schema-change \ --user= \ --password="" \ --host= \ P=,D=,t= \ --charset=utf8 \ --no-version-check \ --execute \ --max-load Threads_running=25 \ --alter "ADD INDEX (, )" pt-online-schema-change \ --alter "ADD INDEX test (test)" \ D=test_db,t=test_table,P=10001 \ --host=1..