[DB] The table is full Error 해결법

—-The table is full Error—-

구 mysql 버전에서 메모리상의 임시 테이블의 크기가 tmp_table_size (기

본 1048576 bytes) 의 크기보다 큰 경우에

The table is full Error ( 유사한 에러메시지로 The table ‘SQL6_0 (임시

테이블명)’ is fullselect ….) 와 같은 에러메시지가 발생합니다.

다음과 같은 방법으로 해결할 수 있습니다.

1. mysql 3.22.XX 이하 버전을 그대로 유지하고자 할 경우

1-1. tmp_table_size 를 늘린다. (임시테이블의 크기를 늘리기 위해

mysqld 에 -O tmp_table_size=# 옵션을 사용합니다.)

mysql.server 파일을 편집기로 열고, safe_mysqld 실행 부분에 -O

tmp_table_size=2097152 와 같이 옵션을 추가합니다.

(./mysqladmin -u root -p variables 로 tmp_table_size 를 확인할 수 있

습니다.)

ex>

———————————————————————

——————————————————-

$bindir/safe_mysqld -O tmp_table_size=2097152 —

user=$mysql_daemon_user –pid-file=$pid_file –datadir=$datadir &

———————————————————————

——————————————————-

1-2 –big-tables 옵션을 사용한다.

mysql.server 파일을 편집기로 열고, safe_mysqld 실행 부분에 -O –big-

tables 와 같이 옵션을 추가합니다.

ex>

———————————————————————

——————————————————-

$bindir/safe_mysqld –big-tables –user=$mysql_daemon_user –pid-

file=$pid_file –datadir=$datadir &

———————————————————————

——————————————————-

2. 문제가 되는 쿼리를 날리기전에 SQL_BIG_TABLES option 을 사용하면 된

답니다.

ex>

—————————————————

mysql> Set SQL_BIG_TABLES = 1;

—————————————————

설명>

———————————————————————

————————————————————

SQL_BIG_TABLES = 0 | 1

If set to 1, all temporary tables are stored on disk rather than in

memory.

This will be a little slower, but you will not get the error The

table tbl_name is full for big SELECT operations that require a

large temporary table.

The default value for a new connection is 0 (that is, use in-memory

temporary tables).

———————————————————————

————————————————————

3. mysql 3.23.xx 버전으로 업그레이드한다.

mysql 버전 3.23 에서는 테이블크기가 tmp_table_size 보다 커지면, 메모

리상에 임시 테이블의 크기를 자동적으로 디스크기반 MyISAM 테이블로 변

환해준다.

서진우

슈퍼컴퓨팅 전문 기업 클루닉스/ 상무(기술이사)/ 정보시스템감리사/ 시스존 블로그 운영자

You may also like...

페이스북/트위트/구글 계정으로 댓글 가능합니다.