Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the method of horizontal segmentation of mysql

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "the introduction of the method of mysql horizontal segmentation". In the daily operation, I believe that many people have doubts about the introduction of the method of mysql horizontal segmentation. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "introduction to the method of mysql horizontal segmentation". Next, please follow the editor to study!

If it is difficult for the application to cut vertically with fine granularity, or if there are a large number of rows of data after cutting, and there is a bottleneck in reading, writing and storage performance of a single library, horizontal cutting is required.

1. Horizontal segmentation is divided into intra-database classification table and intra-database classification table. According to the inherent logical relationship of the data in the table, the same table is distributed to multiple databases or tables under different conditions.

2. Each table contains only part of the data, which reduces the amount of data in a single table and achieves the effect of distribution.

The sub-table in the library only solves the problem that the data of a single table is too large, but it does not distribute the tables to the libraries of different machines, so it is of little help to reduce the pressure on the MySQL database. It is best to solve the CPU, memory and network IO of the same physical machine through sub-database and sub-table.

After split horizontally, the same table appears in multiple databases / tables, each with different contents.

For example, in a blog system, when reading a large number of blogs, split horizon should be used to reduce the pressure on each single table and improve its performance.

Take Weibo table as an example. When 1 million users browse at the same time, if it is a single table, there will be 1 million requests for a single table; if it is a single database, the database will be subject to 1 million requests; if it is divided into 100 tables and distributed in 10 databases, there will be 10, 000 requests for each table, so each database will be subject to 100000 request pressure. Although it is impossible to be absolutely average, it can be illustrative, so that the pressure will be greatly reduced and exponentially reduced.

At this point, the study of "introduction to the method of mysql level Segmentation" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 267

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report