In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following mainly brings you how the MySQL field design specification should avoid using the TEXT/BLOB type. I hope that the MySQL field design specification should avoid using the TEXT/BLOB type. This is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.
I. explanation
Holiday can have time to look at some table design, found a lot of problems, more than 100 fields on the old system, which contains a large number of mediumtext, less than 5 million of the data, the development specification requires that the table design should not exceed 5 million data. Looking at the 120g of disk space occupied by the table, there is no doubt that it is a large table, and the design was not considered at the time of the design. As long as a word can be used online, whatever.
II. MySQL specification
1. A single table should not exceed 5 million records, and the disk space occupied by a single table should not exceed 50 G, otherwise optimization and sub-tables should be considered.
2. Disable the text field type, and if necessary, you need to design the table separately.
III. Reasons for disabling text field types
1, poor performance, sorting and other operations, you can not use memory temporary tables, you must use disk temporary tables.
2. TEXT or BLOB types can only use prefix indexes, and MySQL has a limit on the length of index fields.
IV. Solutions
It is impossible to set the specification and strictly implement it (it is difficult to implement it). It is impossible for one or two DBA to face dozens of business systems, tens of thousands of tables, and millions of fields through manual audit of each table and field.
For the above MySQL field design specifications how to avoid the use of TEXT/BLOB types, we do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.