We have an InnoDB database, which is about 70 GB, and we expect it to grow to several hundred GB in the next 2-3 years. About 60% of the data refer to one table. Currently, the database works quite well, since we have a server with 64 GB of RAM, so almost the entire database fits into memory, but was worried about the future when the amount of data will be much larger. Some method of partitioning tables was being considered right now (especially the one that accounts for most of the data), and Im is now wondering what would be the best way to do this.
The options that I now know about
- Using MySQL Partitioning, which ships with version 5.1
- Using any third-party library that encapsulates data sharing (e.g., hibernation)
- Implementing this in our application
Our application is built on J2EE and EJB 2.1 (we hope that one day we will switch to EJB 3).
What would you suggest?
EDIT (2011-02-11):
Just an update: currently the database size is 380 GB, the data size of our "large" table is 220 GB, and its index size is 36 GB. Thus, while the entire table no longer fits into memory, the index does.
The system is still working fine (still on the same hardware), and we are still thinking about sharing data.
EDIT (2014-06-04): Another update: the size of the entire database is 1.5 TB, the size of our "large" table is 1.1 TB. We upgraded our server to a 4-processor machine (Intel Xeon E7450) with 128 GB of RAM. The system is still working fine. What we plan to do next is to place our large table on a separate database server (we have already made the necessary changes to our software), while updating new equipment with 256 GB of RAM.
This installation is designed for two years. Then we need to either finally start implementing the scalding solution, or just buy servers with 1 TB of RAM, which should hold us for some time.
EDIT (2016-01-18):
Since then, we have placed our large table in our own database on a separate server. Currently, the size of this database is about 1.9 TB, the size of the other database (with all tables except the "large") is 1.1 TB.
Current hardware setup:
- HP ProLiant DL 580
- 4 x Intel (R) Xeon (R) CPU E7- 4830
- 256 GB RAM
In this setup, performance is great.
mysql partitioning sharding database-performance
sme Sep 05 '08 at 13:59 2008-09-05 13:59
source share