In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
When dealing with tables with a large amount of data, a lot of performance of the database will be consumed. therefore, when designing database tables, we should consider this phenomenon and use the reasonable method of database design to improve database performance and reduce database pressure.
When there are too many table records, such as products, orders, a large number of customers, etc., which is the main source of database access pressure, the following two methods can be used to reduce the pressure from the point of view of splitting tables in the database:
1. Split the table horizontally
Split horizontally: split the record of the table horizontally into two tables based on a competing value of the table's primary key
2. Divide the table vertically.
Vertical split: there are too many table fields, split according to the table fields, and divide a table into two tables vertically
Example: there is a product table, the amount of data is 10w, and the amount of data is stable.
Order table, the amount of data is 200w, the amount of data has a growing trend.
User table, the amount of data is 100w, the amount of data has a growing trend.
Scheme 1: vertical segmentation, which solves the io competition between tables, but does not solve the pressure of the growth of the number of single tables.
Further solutions:
-- put the product table and user table on a server
-- the order form is placed on a separate server
Scheme 2: horizontal segmentation, which solves the pressure of the amount of data in a single table, but does not solve the io competition between tables.
Further solutions:
-- the user table is divided into male and female users by gender
-- the order table is split into completed and uncompleted orders
-- Product table, with outstanding orders on a server
-- completed orders and male users on a server
-- female users put it on a server (female users love shopping)
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.