리자

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-07-13 조회 2,172
16-07-12 조회 2,360
16-07-12 조회 2,387
16-07-11 조회 2,194
16-06-05 조회 2,923
16-06-03 조회 3,046
16-05-26 조회 2,966
15-09-22 조회 4,992
15-06-10 조회 4,838
14-10-25 조회 6,369
14-10-22 조회 8,990
14-09-21 조회 5,795
14-09-16 조회 5,083
14-08-22 조회 1.1만
14-08-13 조회 5,917
14-08-12 조회 5,447
14-08-12 조회 6,308
14-08-11 조회 6,936
14-06-12 조회 6,219
14-06-11 조회 5,119
14-05-09 조회 5,436
14-05-09 조회 6,394
14-05-09 조회 6,423
14-05-08 조회 5,762
14-04-17 조회 4,768
14-04-16 조회 4,592
14-04-15 조회 4,594
14-04-15 조회 4,542
14-04-15 조회 4,312
14-04-14 조회 4,294
14-04-14 조회 4,269
14-04-14 조회 4,643
14-04-14 조회 4,784
14-04-14 조회 4,772
14-04-13 조회 4,674
14-04-12 조회 4,244
14-04-12 조회 4,385
14-04-12 조회 4,493
14-04-11 조회 5,015
14-04-10 조회 4,755
14-04-10 조회 4,786
14-04-09 조회 4,946
14-04-09 조회 5,315
14-04-08 조회 6,982
13-10-30 조회 7,663
13-07-11 조회 5,144
13-03-28 조회 1.1만
13-02-27 조회 6,795
13-02-14 조회 5,622
13-01-10 조회 4,524
12-12-31 조회 5,107
12-12-20 조회 6,124
12-12-12 조회 5,281
12-12-07 조회 4,513
12-11-28 조회 4,864
12-11-22 조회 5,306
12-11-12 조회 5,664
12-09-22 조회 4,523
12-09-18 조회 4,708