Answer the question
In order to leave comments, you need to log in
How to share a large mysql database?
Hello!
I have a large MySQL database on one of my projects.
Big, it's about 1 TB (950 GB) and it's growing.
Periodically, several times a year, this miracle is pouring. The reasons are different, most often it is connected with the raid (raid 1) - the screws fly out, and after synchronization the index tables die. And accordingly, the whole thing has to be restored, which causes a lot of inconvenience.
The base consists of only 7 MyISAM tables. The main data is in one table (~ 850 GB).
InnoDB was abandoned immediately after the first attempt to restore a 300 GB database, it was a nightmare.
It is possible to change the storage method in such a way that this table is divided into English alphabetically, i.e. instead of 1 table 850 GB, you get 850 / 26 ~ 32 GB
This will undoubtedly increase the speed of recovery in case of problems, and will also make it possible to work with parts of the database, regardless of other parts (here I mean that if tables: "A", "B", "C" are restored, then they can be returned to work).
Attendance (together with PS) ranges from 150k to 1kk per day, about 25-50 requests per second get to the database.
Questions:
- What are the pitfalls in such a division of the base (32 tables instead of 1)?
- How else can you divide large bases?
- Are there any ways to avoid splitting, other than replication and changing the storage method, in particular the raid?
PS If there is literature on this topic (storage and management of "large" amounts of data), please help with the names.
Thank you!
Answer the question
In order to leave comments, you need to log in
It's probably better to use partitioning instead of manually beating the tables
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question