Sunday, January 18, 2009

Mysql community server table limitation

The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. The following table lists some examples of operating system file-size limits.


Operating System

File-size Limit

Win32 w/ FAT/FAT32

2GB/4GB

Win32 w/ NTFS

2TB (possibly larger)

Linux 2.2-Intel 32-bit

2GB (LFS: 4GB)

Linux 2.4+

(using ext3 filesystem) 4TB

Solaris 9/10

16TB

MacOS X w/ HFS+

2TB

NetWare w/NSS filesystem

8TB


Here is the fix:

alter table_name MAX_ROWS = 10000000; (this can take a while)

To fix it for new tables, add this to you /etc/my.cnf:

myisam_data_pointer_size=6

This will allow tables to have up to a 256TB size limit. The default value is 4 which allows up to 4GB.



No comments: