리자

select ... from a inner join b where a.name = b.name

제목과 같은 쿼리문에서

a.name 은 char(10) 이고
b.name 은 char(20) 인 경우

b.name 이 char(10) 인 경우 보다 속도가 빠르지 않다고 합니다.

필드의 속성은 이렇게 바꿀 수 있습니다.

alter table a modify name char(10);
alter table a change name name char(10);<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:27:00 MySQL에서 이동 됨]</div>

댓글 2개

좋은 정보 고맙습니다.
인덱스가 있는 경우인가요?
http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html

To retrieve rows from other tables when performing joins. MySQL can use indexes on columns more efficiently if they are declared as the same type and size. In this context, VARCHAR and CHAR are considered the same if they are declared as the same size. For example, VARCHAR(10) and CHAR(10) are the same size, but VARCHAR(10) and CHAR(15) are not.
댓글을 작성하시려면 로그인이 필요합니다.

팁게시판

6,077건

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
11-04-28 조회 1,367
11-04-28 조회 1,438
11-04-13 조회 1,124
11-03-27 조회 1,281
11-03-27 조회 1,208
11-03-14 조회 696
11-03-02 조회 992
11-03-02 조회 1,284
11-02-27 조회 1,740
11-02-23 조회 1,153
11-02-19 조회 1,259
11-02-14 조회 2,770
11-02-03 조회 1,587
11-01-24 조회 2,545
11-01-04 조회 1,202
10-12-08 조회 4,056
10-11-15 조회 1,011
10-11-14 조회 1,164
10-11-14 조회 2,156
10-10-29 조회 2,351
10-10-19 조회 1,359
10-10-07 조회 1,310
10-10-05 조회 3,037
10-09-18 조회 1,424
10-09-18 조회 1,194