리자

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.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
16-03-02 조회 3,248
16-01-19 조회 2,531
15-12-23 조회 2,961
15-12-08 조회 3,680
14-10-30 조회 5,737
14-06-06 조회 5,560
12-08-30 조회 3,916
12-08-20 조회 3,833
12-07-15 조회 5,159
12-07-13 조회 3,631
12-07-06 조회 3,858
12-06-27 조회 3,368
12-06-23 조회 3,574
12-05-03 조회 5,183
12-04-20 조회 4,128
12-03-29 조회 4,637
12-03-22 조회 4,743
12-03-22 조회 3,512
12-03-21 조회 3,286
12-03-11 조회 3,717
12-03-06 조회 4,265
12-02-22 조회 4,533
12-02-17 조회 3,332
12-02-17 조회 6,180
12-02-14 조회 6,139
12-02-06 조회 4,265
12-01-18 조회 3,219
12-01-06 조회 3,445
11-12-30 조회 3,917
11-12-30 조회 7,062
11-12-21 조회 3,284
11-12-21 조회 4,247
11-12-16 조회 3,277
11-12-15 조회 3,323
11-12-15 조회 3,424
11-12-15 조회 4,224
11-12-09 조회 3,229
11-12-09 조회 3,309
11-12-07 조회 2,877
11-12-07 조회 3,963
11-12-05 조회 4,419
11-12-02 조회 3,863
11-12-01 조회 2,738
11-12-01 조회 2,781
11-12-01 조회 2,767