In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to write SQL statements without index in mysql". The explanation in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian and go deep into it slowly to study and learn "how to write SQL statements without index in mysql" together.
1. Index columns participate in expression calculation.
SELECT 'sname' FROM 'stu' WHERE 'age' + 10 = 30;
2. Function operation.
SELECT 'sname' FROM 'stu' WHERE LEFT('date',4) < 1990;
3. % Word %-Fuzzy Query.
SELECT * FROM 'manong' WHERE `uname` LIKE ' %%' --Go index SELECT * FROM 'manong' WHERE `uname` LIKE '%%' --Go index
4. Compare strings with numbers.
CREATE TABLE 'a'('a ' char(10));EXPLAIN SELECT * FROM 'a' WHERE 'a'="1" --go index EXPLAIN SELECT * FROM 'a' WHERE 'a'=1 --go index, also use function operation
5. There is or in the query condition.
Even if there is a conditional index, it will not be used. In other words, all fields required to be used must be indexed:
select * from dept where dname='xxx' or loc='xx' or deptno = 45;
Regular expressions do not use indexes.
The optimizer estimates that it is faster to use a full table scan than to use an index instead of an index.
MySQL internal optimizer optimizes SQL statements.
Thank you for reading, the above is "mysql does not go index SQL statement how to write" the content, after the study of this article, I believe we do not go index mysql SQL statement how to write this problem has a deeper understanding, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
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.