In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, I am optimizing a section of sql. The original script is roughly as follows:
select a. field n from tab_a therea. field 2 is not null;
a. Field 2 adds index, but query speed is very slow,
The following changes were made:
select a. field n from tab_a awarenvl (a. field 2,'0')!= '0';
The speed increase was obvious.
What is the reason? It's simple, because is null and is not null invalidate the index of the field.
Although we all know which cases will make the index invalid, but sometimes inevitably affected by business requirements and consider not comprehensive enough, so sql optimization should be carried out at any time, at any time. Efforts to improve sql execution efficiency.
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
Package com;import java.sql.Connection;import java.sql.ResultSet;import java.sql.SQLException;import
© 2024 shulou.com SLNews company. All rights reserved.