리자

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건
+
제목 글쓴이 날짜 조회
12-01-11 조회 2,785
12-01-11 조회 1.2만
12-01-10 조회 2,882
12-01-08 조회 3,471
12-01-05 조회 5,360
11-12-29 조회 3,080
11-12-27 조회 2,867
11-12-25 조회 3,052
11-12-22 조회 3,484
11-12-14 조회 2,947
11-12-12 조회 3,581
11-11-28 조회 3,405
10-10-19 조회 2,861
08-09-05 조회 3,775
08-09-05 조회 3,596
08-06-14 조회 3,336
08-04-22 조회 3,615
08-04-17 조회 3,623
07-10-03 조회 4,229
07-10-03 조회 3,626
07-10-03 조회 7,307
07-10-03 조회 4,590
07-10-03 조회 3,289
07-10-03 조회 2,881
07-10-02 조회 3,594
07-10-02 조회 3,118
07-09-27 조회 5,043
07-09-27 조회 3,880
06-09-26 조회 3,531
06-09-26 조회 4,754
06-09-22 조회 3,924
06-09-22 조회 3,544
06-09-22 조회 4,294
06-09-21 조회 4,224
06-08-18 조회 3,713
05-11-30 조회 4,761
05-07-15 조회 4,622
05-03-23 조회 4,664
05-03-14 조회 3,334
05-03-13 조회 2,707
04-08-05 조회 5,787