- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
sql语句优化技术分析(Technical analysis of SQL statement optimization)
Operator optimization
1 and IN operators
The advantage of SQL written in IN is that it is easier to write and clear and easy to understand, which is more suitable for the style of modern software development. However, the performance of SQL with IN is always low, and the steps performed from Oracle to analyze SQL using IN are different from those of SQL without IN:
ORACLE tried to convert it into a multi table connection, if the conversion is not successful is the first implementation of IN inside the sub query, and then query the outer table records, if successful conversion directly using multiple tables connection query. This shows that the SQL with IN has at least one conversion process. The general SQL can be converted successfully, but it can not be converted to SQL with packet statistics.
Recommendation: in the business intensive SQL, try not to use the IN operator, instead of using the EXISTS scheme.
2, NOT, IN operators
This operation is not recommended by strong columns because it cannot apply the index of the table.
Recommendation: replace with NOT EXISTS scheme
3, IS, NULL, or IS NOT NULL operations (to determine whether the field is empty)
If the field is empty, the index is not used because the index is not index null.
Recommendation: replace with other operational operations of the same function, such as: A, is, not, null, a0 or a, etc.. Null fields are not allowed, and a default value is used instead of null values. For example, the status field in the application is not allowed to empty, and the default is an application.
4 or greater than or less than operator)
Greater than or less than operator under normal circumstances is no adjustment, because it will be used to search the index, but in some cases it can be optimized, such as a table with 1 million records, a numerical field A, records of 300 thousand A=0, 300 thousand A=1 record 390 thousand records, A=2 records, 10 thousand A=
您可能关注的文档
- 大意如何学英语(How to learn English).doc
- 大中型立式电机水泵效率特性的现场测试方法(Field test method for efficiency characteristics of large and medium vertical motor pumps).doc
- 大众媒介广告术语abc(Mass media advertising terminology ABC).doc
- 大众型服饰品牌终端培训的三元主体(The three main body of terminal training for popular clothing brands).doc
- 大洋洲(Oceania).doc
- 多孔陶瓷的制备及其应用(Preparation and application of porous ceramics).doc
- 大张伟语录(Wowkie Zhang Quotes).doc
- 多媒体教室(Multi-Media Classroom).doc
- 多种肿瘤标志物芯片检测在肿瘤诊断中的应用价值(The application value of multiple tumor marker chip detection in tumor diagnosis).doc
- 妇产科护理工作的安全管理时间(The safety management time of gynecology and obstetrics nursing).doc
- sql注入原理及防范措施(Principle and preventive measures of SQL injection).doc
- 分类单词-职业(Classified words - Occupations).doc
- 分色、挂网、套印、拼版知识(Color, net, overprint, imposition of knowledge).doc
- srep——硅树脂乳胶涂料(Srep - Silicone latex paint).doc
- 分团委书记例会内容(11月7日)(The contents of the regular meetings of the Youth League Committee (November 7th)).doc
- 分析固体微结构的方法(Method for analyzing solid microstructures).doc
- stl文件(stl file).doc
- svn解决冲突(如果你想彻底删除(不使用垃圾箱),在点击删除时,请按着shift键)(Svn resolve conflicts (if you want to completely delete (do not use garbage bins), click delete, press the shift key)).doc
- 分析化学答案3(Analytical chemistry answer 3).doc
- s色彩1(S color 1).doc
最近下载
- 2023年湖南科技大学计算机科学与技术专业《操作系统》科目期末试卷B(有答案).docx VIP
- 质押黄金合同协议.docx VIP
- OMRON欧姆龙J780说明书.pdf
- 私法英语表达 智慧树 知到答案.docx VIP
- 装饰公司各岗位职位说明书.docx
- 充电桩安全保护措施.doc VIP
- 河北省邢台市内丘县2023-2024学年小升初语文试卷 附解析.doc VIP
- 单级单吸离心泵拆卸.ppt VIP
- (正式版)S-H-T 1844-2024 工业用乙烯、丙烯中痕量氢气、一氧化碳、二氧化碳的测定 气相色谱-氦离子化检测法.docx VIP
- 建筑施工易发事故防治安全标准(JGJ T 429-2018)解读31.ppt VIP
文档评论(0)