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 is the reason why the mysql display is invalid

2025-01-17 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 reason why mysql display is invalid, it has certain reference value, friends who need it can refer to it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Mysql shows invalid reasons and solutions: 1, the or condition of all columns are indexed; 2, the like query to "%" start without the index; 3, implicit conversion will invalidate the index; 4, the query condition using the function on the index list or in the index column using the "+ -" operator.

Several cases of mysql failure

1. If there is or in the query condition, even if there is an index in the query condition, it will be invalid. If you want to use or and do not want the index to fail, you can only add an index to all the columns in the or condition.

2. Like query does not use index at the beginning of 1%.

3. Implicit conversion will invalidate the index

For example, if the field type is varchar and index, but the number type is passed, the index will be invalidated. On the contrary, if the field type is int, the value passed will be varchar, but the index will not be affected.

4. Query conditions that use functions on index lists or operators such as +-on index columns will also fail

Thank you for reading this article carefully. I hope the editor can share what is the reason why the mysql display is invalid. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you have any problems. Detailed solutions are waiting for you to learn!

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

Database

Wechat

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

12
Report