In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what is the difference between MySQL partition and slicing, the contents of the article are carefully selected and edited by the author, with a certain pertinence, the reference significance for everyone is still relatively great, the following with the author to understand the difference between MySQL partition and slicing.
Sharding: sharding Sharding is not a new technology, but a relatively simple software concept. It is well known that data table partitioning was not available until MySQL 5, so before that, many potential users of mysql had concerns about the scalability of MySQL, and the ability to partition has become a key indicator of whether a database is extensible or not (not the only indicator, of course). Database extensibility is an eternal topic, and promoters of MySQL are often asked: how do you do things like dealing with application data on a single database because of the need for partitioning? The answer is Sharding. Sharding is not an accessory function of a particular database software, but an abstract processing based on specific technical details. It is a solution of horizontal expansion (Scale Out, or horizontal expansion or outward expansion). Its main purpose is to break through the limitation of IMagano capability of single-node database server and solve the problem of database expansibility.
The data is distributed horizontally to different DB or table through a series of segmentation rules, and the specific DB or table that needs to be queried is found through the corresponding DB routing or table routing rules for Query operation. The term "sharding" here usually refers to "horizontal segmentation", which is the focus of this article. What kind of segmentation and routing will there be? At this point, readers will inevitably have questions. Let's give a simple example: let's explain the log in a Blog application. For example, the article table has the following fields: article_id (int), title (varchar (128)), content (varchar (1024)), user_id (int).
The so-called specific user is represented by the field of the database as "user_id". This is the "user_id", which is the basis and rule basis of the sub-library that we need. We can do this by putting all the article information with a user_id of 1: 10, 000 in the article table in DB1, all the article information with user_id of 1000, 1, 000, 000 in the article table in DB2, and so on, all the way up to DBn. In this way, the article data is naturally divided into various databases to achieve the purpose of data segmentation.
In order to get the target data, we use the DB routing function to find and store the corresponding data on that server.
Looking at this, do you think this is very similar to the table partition? It is true that there are many similarities between zoning and slicing, but what is the difference between them?
The difference between Sharding and database partition (Partition)
Sometimes, Sharding is also approximately equated with horizontal partition (Horizontal Partitioning). Horizontal partition is also used to refer to Sharding in many places on the Internet, but I personally think there is actually a difference between the two. Indeed, the idea of Sharding comes from the idea of partitioning, but database partitioning is basically data object-level processing, such as table and index partitioning, where each child dataset can have different physical storage properties or operations within a single database, while Sharding can span databases or even physical machines.
Differences between mysql fragmentation and Partition
The Partition function provided by MySQL5.1 does realize the partitioning of tables, but this kind of partitioning is limited to a single database, and it cannot cross the limits of the server. If you can ensure that the amount of data can hardly exceed the physical capacity of the existing database server, then you only need to use the Partition feature provided by MySQL5.1 to improve database performance; otherwise, consider applying the concept of Sharding, spider storage engine is a good choice.
After reading the above about the differences between MySQL partitions and fragments, many readers must have some understanding. If you need more industry knowledge and information, you can continue to follow our industry information column.
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: 0
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.