In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly gives you a brief introduction to the definition of LIST COLUMNS zoning, and you can check the relevant professional terms on the Internet or find some related books to supplement them. Here, we will not dabble in, go straight to the topic, and hope to bring you some practical help.
Mysql 5.6starts to support LIST COLUMNS partitioning, you can start using multiple columns as partitioning keys, and column data types can be used as partitioned columns in addition to numeric types; you can also use string types, DATE and DATETIME
You have a business with customers in 12 cities, and for sales and marketing purposes, your organization is divided into three cities into one area
For LIST COLUMNS partitions, you can create a customer data table based on the name of the city and declare 4 partitions when your customer exists the corresponding area:
CREATE TABLE customers_1 (first_name VARCHAR (25), last_name VARCHAR (25), street_1 VARCHAR (30), street_2 VARCHAR (30), city VARCHAR (15), renewal DATE) PARTITION BY LIST COLUMNS (city) (PARTITION pRegion_1 VALUES IN ('Oskarshamn',' H ö gsby','M ö nster å s'), PARTITION pRegion_2 VALUES IN ('Vimmerby',' Hultsfred','V ä stervik'), PARTITION pRegion_3 VALUES IN ('N ä ssj ö') 'Eksj ö', 'Vetlanda'), PARTITION pRegion_4 VALUES IN (' Uppvidinge', 'Alvesta',' V ä xjo'))
Use date partition
CREATE TABLE customers_2 (first_name VARCHAR (25), last_name VARCHAR (25), street_1 VARCHAR (30), street_2 VARCHAR (30), city VARCHAR (15), renewal DATE) PARTITION BY LIST COLUMNS (renewal) (PARTITION pWeek_1 VALUES IN ('2010-02-01,' 2010-02-02, 2010-02-03, 2010-02-04, 2010-02-05) '2010-02-06,' 2010-02-07), PARTITION pWeek_2 VALUES IN ('2010-02-08, 2010-02-09, 2010-02-10, 2010-02-11, 2010-02-12, 2010-02-13, 2010-02-14), PARTITION pWeek_3 VALUES IN (2010-02-15, 2010-02-16, 2010-02-17) '2010-02-18,' 2010-02-19, '2010-02-20,' 2010-02-21), PARTITION pWeek_4 VALUES IN ('2010-02-22,' 2010-02-23, '2010-02-24,' 2010-02-25, '2010-02-26, 2010-02-27, 2010-02-28))
However, this situation is very complex when the date grows to a very large size, so it is better to use RANGE partitioning.
LIST COLUMNS partition definition analysis will first tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.