MySQL what is the maximum size of a database?

前端 未结 4 1491
小鲜肉
小鲜肉 2021-01-07 19:10

I have looked all over the MySQL website and found no definitive answers.

  1. Is the size of the database determined by the operating system or is there 4GB limit
相关标签:
4条回答
  • 2021-01-07 19:48

    default mysql is 256 TB for myd file with 6 byte pointer size. i know this is ridiculous answer, but that is what you wanted to know. in real life all depends on the queries, indexes, column count, row count, etc.. i guess.

    0 讨论(0)
  • 2021-01-07 19:49

    With today's hardware and OS, together with MySQL's preferred Engine InnoDB, the table size limitation is 64TB. With PARTITIONing, that can be stretched to over a hundred petabytes.

    A database is a collection of tables. So, to answer the title question literally, we need to go beyond the max table size. Since there can be thousands of tables in a database, we are now into the exabyte stratosphere.

    See also Hard limits in MySQL .

    0 讨论(0)
  • 2021-01-07 19:50

    According to the MySQL Manual:

    E.10.3. Limits on Table Size

    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. This is only a rough guide and is not intended to be definitive. For the most up-to-date information, be sure to check the documentation specific to your operating system.

    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 file system) 4TB
    Solaris 9/10                         16TB
    MacOS X w/ HFS+                      2TB
    

    Windows users, please note that FAT and VFAT (FAT32) are not considered suitable for production use with MySQL. Use NTFS instead.

    On Linux 2.2, you can get MyISAM tables larger than 2GB in size by using the Large File Support (LFS) patch for the ext2 file system. Most current Linux distributions are based on kernel 2.4 or higher and include all the required LFS patches. On Linux 2.4, patches also exist for ReiserFS to get support for big files (up to 2TB). With JFS and XFS, petabyte and larger files are possible on Linux.

    As for the other part of your question, a few thoughts:

    1. It's a broad, complex, multi-factorial question. Consider narrowing the scope of the question to MySQL and one other RDBMS (eg. SQL Server) and probably even one particular feature.
    2. Google is your friend.
    3. Vendors tend to publish their own biased comparisons. Take vendor numbers with a grain of salt.
    0 讨论(0)
  • 2021-01-07 19:59

    1- With respect to database size, the limit is dependent on Operating System file size. Please see this article
    2- The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. (Source)
    3- You may google for MySQL vs SQL Server Vs Oracle, also check this link

    0 讨论(0)
提交回复
热议问题