SQL Execution – Putting It All Together SQL执行--把所有放在一起
(page 81)
Now that I’ve covered the details, I’m ready to put the whole picture
of how a SQL statement executes together. Figure 2-4 shows the steps
that are involved when a SQL statement executes.
既然我已经详述过了,我准备把SQL语句如何执行的整体(流程)图整合在一起。图2-4展示了当一SQL语句执行时所涉及的步骤。
This is a simplified view, but it encapsulates the view of the
process. From a big picture perspective, every query must complete
PARSE , EXECUTE and FETCH steps. DML statements ( INSERT, UPDATE,
DELETE) will only need to parse and exectue. In addition to these steps,
statements that use bind variables will also include a step to read the
bind values as part of the parse component.
这是一个简图,但是它封装了流程图。从一幅画的角度看,每个查询必须完成PARSE(解析), EXECUTE(执行) 和
FETCH(取数据)步骤。DML语句
(INSERT, UPDATE,
DELETE)
只需要解析和执行。除去这些步骤,若语句使用绑定变量的也还包含一步去读取绑定值而作为解析组件的一部分。
Summary
Understanding how SQL executes will enable you to write it more
effectively. The optimizer is at the heart of every SQL statement you
write;writing SQL with the optimizer in mind will help you more than you
can imagine. On this point, I'll ask you to trutst me for now. I can
assure you that understanding the optimizer has been one of the most
beneficial pieces of knowlege I've gained. So, don't get frustrated if
you're itching to just start looking at syntax and specific SQL code.
What you'll end up with by the end of this joureny will be well worth
it.
理解SQL如何运行将使你能把它写的更有效率。优化器作用在你所写每条SQL语句的“内心”中;写SQL时考虑到优化器会给予你超出你想象的好处。在这一点上,现在请信任我。我能向你保证理解优化器是我所获得最优价值的知识之一。所以,不要沮丧如果你开始急于查询语法和特定的SQL代码。在这趟学习旅程结束时你将发现它很值得。
At this point, I hope you feel more comfortable with
at least some of the key parts of Oracle's architecture that are
involved in the execution of the SQL you send to the database. You
should also have a flavor for the power of statistices and how they are
used by optimizer. It is outside the scope of this book to go into more
detail about this topic, but I'd highly recommend picking up Jonathan
Lewis' Cost-Based Oracle Fundamentals if you really want to take a deep
dive into this subject matter.
The more you know, the better equipped
you'll be write SQL that works with the optimizer and not against it.
此刻,我希望你对发送给数据库执行SQL所涉及到的一些Oracle架构的关键部分感觉“舒适”多了。你也应该对统计的力量和他们如何被优化器使用有所领悟。更详细的讨论这个主题已经超出本书的范围,但是我强烈推荐选择Jonathan Lewis的《Cost-Based Oracle
Fundamentals》如果你真想深入这一主题。
你知道的越多,越有能力写出同优化器协调的而不是违背它的SQL。
In the
chapter ahead, I'm going to cover the access and join methods the
optimizer can choose and review numerous examples of how and why the
optimizer does what it does. What I've covered so far has built the
foundation for what I'll cover next and each chapter will continue to
add to the foundation.The goal is to shed some light on the black box
into which you've been throwing SQL and to help you develop and enriched
perspective on the importance of what's under the covers of Oracle, in
particular the optimizer, and how properly interact with it.
在后面的章节中,我将讲解优化器能选择的访问和连接方法然后讨论很多如何和为什么优化器会这样做的例子。我到现在为止所讲述的这些知识构建了后续章节的基础且每一章都将不断的巩固这个基础。目标是向你抛出SQL的黑盒散发一些光芒,帮助你开发和充实Oracle面罩之下重要性的观点,特别是优化器,以及如何适当的同它交互。
- 大小: 47.2 KB
分享到:
相关推荐
NULL 博文链接:https://caohong286.iteye.com/blog/1225434
NULL 博文链接:https://caohong286.iteye.com/blog/1528711
Pro Oracle SQL unlocks the power of SQL in the Oracle Database—one of the most potent SQL implementations on the market today. To master it requires a three-pronged approach: learn the language ...
Oracle SQL Tuning with Oracle SQLTXPLAIN: Oracle Database 12c Edition by Stelios Charalambides English | 8 May 2017 | ISBN: 1484224353 | 408 Pages | PDF | 24.39 MB Learn through this practical guide ...
Chapter 2 - Small Victories—Creating Projects With IDE’s Chapter 3 - Project Walkthrough—An Extended Example Chapter 4 - Computers, Programs, & Algorithms Part II - C++ Language Chapter 5 ...
Pro SQL Server Internals is a book for developers and database administrators, and it covers multiple SQL Server versions starting with SQL Server 2005 and going all the way up to the recently ...
Topics covered: How to use Oracle PL/SQL in all its manifestations through Oracle9i. Fundamentals of program structure (loops, cases, exceptions, etc.) and execution get attention, as do data types, ...
You can download the examples (consisting of 60 sample projects) described in this book from the following Google Code project: code.google.com/p/getting-started-with-spring-framework-2edition/ ...
Chapter 2, Understanding DDL and DCL Statements in SQL Server, introduces the reader to the SQL Server 2014 Transact-SQL language elements and SQL Server 2014 Management Studio (SSMS 2014). This ...
making-sense-dependency-injection-test-execution-listener-源码.rar
PS4-4.0x-Code-Execution-PoC, 我对 qwertyoruiopz 4.0 x的编辑利用来自http的PoC PS4 x 4.0代码执行这个 repo 是我对 4.0 x webkit的编辑,利用 qwertyoruiopz 发布。 edit组织。注释和在 3.50 4.07 ( 3.50,3.55,...
Oracle SQL Tuning Pocket Reference Copyright Chapter 1. Oracle SQL TuningPocket Reference Section 1.1. Introduction Section 1.2. The SQL Optimizers Section 1.3. Rule-Based Optimizer Problems and ...
创建索引 显示执行计划 oracle-Execution_plan脚本运行配置-010.doc
Chapter 2 - Statistics, Probability and Noise Signal and Graph Terminology Mean and Standard Deviation Signal vs. Underlying Process The Histogram, Pmf and Pdf The Normal Distribution Digital Noise ...
This is good project on Detecting Windows NT/2K process execution.
In the last decade, SQL Server has evolved into a sophisticated Enterprise RDBMS tool, and it is still growing by providing more functionalities to store and manipulate data reliably. eXtensible ...
Chapter 1-The CLR’s Execution Model 增加了/optimize和/debug的讨论,及其相互关系。 Chapter 2-Building, Packaging, Deploying, and Administering Applications and Types 改进了关于Win32 manifest信息和...
SQL Compare Pro Compares and synchronizes SQL Server database schemas SQL Data Compare Pro Compares and synchronizes SQL Server database contents SQL Source Control Connect your existing source ...
Chapter 2: SQL-on-Big-Data Challenges & Solutions Chapter 3: Batch SQL—Architecture Chapter 4: Interactive SQL—Architecture Chapter 5: SQL for Streaming, Semi-Structured, and Operational Analytics ...