- 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语句(How to write efficient SQL statements)
如何写出高效的sql语句(How to write efficient SQL statements)
(1) select the most efficient table name order (valid only in the rule based optimizer):
The Oracle parser in accordance with the order from right to left with a table in the FROM clause, the FROM clause written at the end of the table (based on table driving table) will be processed first, in the FROM clause contains multiple tables, you must select the number of records at the table as the base table. If you have more than 3 tables connected to the query, you need to choose the table table (intersection) as the base table, which refers to the table referenced by other tables
(2) the join order in the WHERE clause:
The ORACLE sequence analysis of WHERE clause bottom-up, according to this principle, the connection between the tables must be written before the other end of the WHERE conditions, these conditions can filter out the maximum number of records that must be written in the WHERE clause.
(3) avoid using * in the SELECT clause:
ORACLE in the parsing process, will be * are converted to all the names, this is done by querying the data dictionary, which means there will be more time consuming
(4) reduce the number of accesses to the database:
ORACLE does a lot of work internally: parsing SQL statements, estimating index utilization, binding variables, reading data blocks, and so on;
(5) to reset the ARRAYSIZE parameter in SQL*Plus, SQL*Forms, and Pro*C, you can increase the amount of retrieved data per database access, with a recommended value of 200
(6) use the DECODE function to reduce processing time:
Using the DECODE function, you can avoid repeated scans of the same record or repeated connections to the same table
(7) integrating simple, unrelated database access:
If you have a few simple database query statements, you can integrate them into a query (even if they dont matter)
(8) delete duplicate records:
The most efficient way to delete duplicate records (using the ROWID) example:
DELETE, FROM, EMP, E, W
您可能关注的文档
- 牵引变电所常见故障判断和处理.doc
- 特殊管理抗菌药物使用临床应用和评价标准2013.2.2.doc
- 特种加工习题和解答-示范.doc
- 现代软件工程(第二讲) 软件工程现状和其发展.ppt
- 瓜州电缆性能保证值和需要数量.doc
- 玻璃钢反应釜性能和介绍.doc
- 王镜岩-生物化学(第三版)配套练习和详解.doc
- 甘薯sporamin胰蛋白酶抑制剂活性影响机制和抗肿瘤作用研究.doc
- 生产2 220V停电线路验电、挂接地线和单横担安.doc
- 生产医疗费用和医生...doc
- 如何写医学综述(How to write a medical review).doc
- 如何写系统分析书(How to write a Book Analysis System).doc
- 如何创新发展缔造盛世荣华(How to create a golden splendor of innovation and development).doc
- 如何写土木工程概论论文(How to write the introduction to civil engineering papers).doc
- 如何写sql(How to write SQL).doc
- 如何利用均衡器改善音质(How to use the equalizer to improve sound quality).doc
- 如何制作材料明细表(How to make a list of material).doc
- 如何加强对学生的管理(How to strengthen the management of students).doc
- 如何区分基础梁、基础拉梁、基础连梁、地下框架梁、地梁(How to distinguish foundation beam, the fundamental beam, foundation beams, underground frame beams and beam).doc
- 太阳能热利用课件-2(Solar thermal utilization of -2 courseware).doc
最近下载
- 麒麟区村干部任期和离任经济责任审计主要做法、成效及改进研究.doc VIP
- 心电图avR导联ST段抬高对左主干病变的判定及临床意义.doc VIP
- 2025年高考日语试卷试题真题及答案详解(精校打印版) .pdf
- 巧用均线,趋势跟踪新视角:均线排列在择时、风格和行业上的应用.pdf VIP
- 高一英语必修三单词表人教版2024.doc VIP
- 酒店装修施工组织设计方案.pdf VIP
- 中兴U31-操作指南(SDH网元管理).pdf VIP
- 任期经济责任审计报告的主要内容 2015村干部任期和离.doc VIP
- 新课标人教版数学六年级上册全册各单元教材解读精品课件.pptx VIP
- 20180410--技术择时系列报告之二均线交叉结合通道突破择时研究.pdf VIP
文档评论(0)