03eea2098e
- 01~07 작업 문서를 운영 측정값 기준으로 정리 (문서의 DB 비밀번호 삭제) - app_highest_record 중복 8,795행 점수 기준 정리, 인덱스 5개 + UNIQUE 키 2개 추가 - 02·04 공통 측정 스크립트와 측정 결과, comparison.txt 추가 - 서버 처리 시간 18~292배 단축, 결과 행 수 동일 - 운영 데이터 백업과 권한(비밀번호 해시) 파일은 커밋에서 제외 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
34 lines
1.2 KiB
SQL
34 lines
1.2 KiB
SQL
-- best_record: 랭킹용
|
|
ALTER TABLE best_record
|
|
ADD INDEX IF NOT EXISTS idx_maestro_app_dt (MaestroID, AppID, RecordDateTime),
|
|
ALGORITHM=INPLACE, LOCK=NONE;
|
|
|
|
-- best_record: 히스토리/저장용
|
|
ALTER TABLE best_record
|
|
ADD INDEX IF NOT EXISTS idx_maestro_player_app_dt (MaestroID, PlayerID, AppID, RecordDateTime),
|
|
ALGORITHM=INPLACE, LOCK=NONE;
|
|
|
|
-- typing_exam_record
|
|
ALTER TABLE typing_exam_record
|
|
ADD INDEX IF NOT EXISTS idx_maestro_writing_dt (MaestroID, WritingID, RecordDateTime),
|
|
ALGORITHM=INPLACE, LOCK=NONE;
|
|
|
|
ALTER TABLE typing_exam_record
|
|
ADD INDEX IF NOT EXISTS idx_maestro_player_writing_dt (MaestroID, PlayerID, WritingID, RecordDateTime),
|
|
ALGORITHM=INPLACE, LOCK=NONE;
|
|
|
|
-- license_score
|
|
ALTER TABLE license_score
|
|
ADD INDEX IF NOT EXISTS idx_maestro_player_dt (MaestroID, PlayerID, ScoreDateTime),
|
|
ALGORITHM=INPLACE, LOCK=NONE;
|
|
|
|
-- app_highest_record: UNIQUE 키
|
|
ALTER TABLE app_highest_record
|
|
ADD UNIQUE KEY IF NOT EXISTS uk_maestro_player_app (MaestroID, PlayerID, AppID),
|
|
ALGORITHM=INPLACE, LOCK=NONE;
|
|
|
|
-- typing_exam_highest_record: UNIQUE 키
|
|
ALTER TABLE typing_exam_highest_record
|
|
ADD UNIQUE KEY IF NOT EXISTS uk_maestro_player_writing (MaestroID, PlayerID, WritingID),
|
|
ALGORITHM=INPLACE, LOCK=NONE;
|