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

What are the common principles in mysql

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of what the common principles in mysql are, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will have something to gain after reading this common principle in mysql. Let's take a look.

1. Leftmost matching principle

For example, if you build an index (aforce b), there is no need to build an an index, because (aforce b) already contains an an index, so there is no need to create a b index, but the b index still needs to be created separately, because (aforce b) is to satisfy the case of an and b, and only b does not mean.

Of course, an and b should consider the size of these two indexes, and try to choose the small ones as separate indexes. Because it's faster.

First of all, if you can maintain one index less by adjusting the order, then this order often needs to be given priority.

2. According to the principle of equivalence, the fields queried are the same as those in the database, and = match

100% use index.

3. Leftmost prefix matching principle

To use like for fuzzy queries, 1% can use indexes, but 1 cannot.

4. The principle of scope search

If there is a range query in the where statement, only the leftmost index of the federated index can use the range query.

5. The principle of equivalent matching + range matching

This is the end of the article on "what are the common principles in mysql?" Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "what are the common principles in mysql". If you want to learn more knowledge, you are welcome to follow the industry information channel.

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.

Share To

Internet Technology

Wechat

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

12
Report