여태 아무 생각없이 INDEX를 걸고 있었는데...
갑자기 문득 궁금한게 생겨났어..

인덱스를 걸때..

INDEX `idx_refer` (`idx_refer`,`file_classify`,`mb_id`) 구문과...

INDEX (`idx_refer`),
INDEX (`file_classify`),
INDEX (`mb_id`)
구문에 혹시 차이점이 있는지..차이점이 있다면..그 차이점이 무엇인지..설명좀 해줄수 있는횽 있을까..?

첫번째 구문과 두번째 구문으로 생성해서 보면...
첫번째 구문은 idx_refer 라는 키 이름으로 괄호안에 있는 해당 컬럼들을 인덱스 거는것 같고..
두번째 구문은 각각의 개별 인덱스 키를 만드는거 같고..
그래서..이 두가지의 차이점이 뭔가 속도나 다른것에 차이점이 생겨나는지..알고 싶음..


참고로..첫번째 구문으로 인덱스 생성시,
Specified key was too long; max key length is 1000 bytes 라는 에러 구문을 내뱉음..

해결 방법은 구글링 해본결과
=============================================================================================
\"Prefixes can be up to 255 bytes long (or 1000 bytes for MyISAM and InnoDB tables as of
MySQL 
4.1.2). Note that prefix limits are measured in bytes, whereas the prefix length in
CREATE INDEX 
statements is interpreted as number of characters. Take this into account when specifying
prefix length for a column that uses a multi-byte character set.\"

You are correct, it is the utf8 that is causing the extra bytes.  Try creating the table
this way:

CREATE TABLE phpgw_lang (
lang varchar(5) NOT NULL DEFAULT \'\',
app_name varchar(100) NOT NULL DEFAULT \'common\',
message_id varchar(255) NOT NULL DEFAULT \'\',
content text,
PRIMARY KEY(lang,app_name(75),message_id(100))
);

This will index the first 75 and 100 chars from the columns which should work
and be faster in general as well.
=============================================================================================

요게 답인데..UTF8 로 생성시 각 컬럼의 길이 *3 이 1000 바이트를 넘어서지 않게 적당히 조정하면 될거 같긴한데..
(사실 이것도 잘 이해되지 않는 부분이 그럼..255byte 길이의 컬럼을 100byte 로 인덱스를 걸면...255byte 의 데이터가 들어올경우 인덱스는 어케 되는거지?!)
여튼..첫번째 구문과 두번째 구문에 대해서 차이점을 설명해줄 횽 있으면 댓글점...>_<