How large and busy can a MySQL database be?
For MySQL databases, our normal restrictions on disk space and server resource limits apply, including memory usage, CPU usage, and disk writes. In other words, the server resource usage of any MySQL queries you perform is counted toward your resource limits, just like the usage of the script itself.
In addition, a practical size limit on MySQL databases with shared hosting is:
- A database should not contain more than 1,000 tables;
- Each individual table should not exceed 1 GB in size or 20 million rows;
- The total size of all the tables in a database should not exceed 2 GB.
These limits are fairly high. Less than 0.05% of our customers ever create databases this large, and we’ll notify you if it happens. (If you get such a notification, you may want to try optimizing the table to see if it can be compacted to save space, although this can prevent updates to the table for several minutes.)
While we don’t manually enforce these limits to prevent you from exceeding them by small amounts, you may have problems if you do so. As one example, scripts on your site may experience timeouts during MySQL backups of such large tables. As another example, we limit MySQL temporary table size to 6 GB, which may prevent sorting of unindexed tables that exceed 1 GB in size. In addition, we may disable databases that exceed these limits if they interfere with other databases on the same server.
Can I pay you for a plan that exceeds these limits?
Unfortunately not. Limits like this are inherent in shared database hosting, which is the only kind we offer; the only solution is to reduce the amount of data you store or spread it among different databases or tables. If you can’t do so, you will unfortunately need to switch your site to a dedicated server that can handle the high load.
Is there anything else I should know about MySQL and large data sets?
If you’re importing large amounts of data, make sure you’re following the tips on our “Large MySQL Imports” page. That will avoid problems and make your import go much faster.