I understand that the criterion you want is “solving problems when you encounter them”
Problems encountered include slow reading response, long writing time and need to wait, SQL deadlock, unreasonable table design that cannot meet the business logic implementation, etc.
Problem solving refers to solutions based on problem analysis, such as the horizontal segmentation, vertical segmentation, and master-slave you mentioned. Just judge which access to use based on the business scenario you encounter. For example, the amount of table data is too large to read. If it is slow, then split it horizontally. If there is a lot of reading and little writing, then separate master-slave reading and writing, etc.
Of course, the general system will have some performance margin to cope with business growth, so if master-slave and data segmentation are done from the beginning, it is equivalent to an estimate of business launch or growth
I understand that the criterion you want is “solving problems when you encounter them”
Problems encountered include slow reading response, long writing time and need to wait, SQL deadlock, unreasonable table design that cannot meet the business logic implementation, etc.
Problem solving refers to solutions based on problem analysis, such as the horizontal segmentation, vertical segmentation, and master-slave you mentioned. Just judge which access to use based on the business scenario you encounter. For example, the amount of table data is too large to read. If it is slow, then split it horizontally. If there is a lot of reading and little writing, then separate master-slave reading and writing, etc.
Of course, the general system will have some performance margin to cope with business growth, so if master-slave and data segmentation are done from the beginning, it is equivalent to an estimate of business launch or growth