SQL Parsing Flow Diagram (Doc ID 32895.1) SQL解析流程图

SQL Parsing Flow Diagram (Doc ID 32895.1)

PURPOSE

 The document gives a basic overview of the steps involved in Parsing. This document was created in the Oracle 7 time frame, and although some changes have inevitably occurred, some additions have been made. These additions are referred to in the notes section where appropriate.   该文档对解析中涉及的步骤进行了基本概述。本文档是在Oracle 7时间框架内创建的,尽管不可避免地发生了一些更改,但进行了一些补充。这些补充内容在适当的地方在“注释”部分中提到。

SCOPE

 For users requiring a general overview of how parsing works.  对于需要一般性分析原理的用户。

DETAILS

This article show the parsing mechanism as a flow diagram. Its main purpose is to show the difference between a 'soft' and a 'hard' parse. It is intended to give a feel of how parsing operates to make explanation of parsing activity easier.  本文以流程图的形式显示了解析机制。其主要目的是显示“软”和“硬”解析之间的区别。旨在使您了解解析的操作方式,从而使解析活动的解释更加容易。

SQL Parsing Flow Diagram:  SQL解析流程图:

NOTES
 

1. A cursor is an address on the client that points to the memory location of a SQL statement on the server. Multiple-client cursors may point at the same address on the server.  游标是客户端上的地址,它指向服务器上SQL语句的内存位置。多客户端游标可能指向服务器上的相同地址。

2. Remember that 'Client' and 'Server' sides may reside on the same machine - in which case Client/Server is a logical distinction.  请记住,'Client' and 'Server'可能位于同一台计算机上,在这种情况下,Client/Server是逻辑上的区别。

3. If a cursor is open, then the statement will be in the sql_area, so no parsing is necessary. This is why locks may remain when a client is terminated abnormally (such as a PC Client being turned off without closing open cursors).  如果游标已打开,则该语句将位于sql_area中,因此无需进行解析。这就是为什么当客户端异常终止(例如,关闭PC客户端而不关闭打开的游标)时可能保留锁的原因。

4. SESSION_CACHED_CURSORS is the initialisation parameter that specifies how many cursors to hold open for a particular session.   SESSION_CACHED_CURSORS是初始化参数,用于指定为特定会话保持打开状态的游标数量。
The open cursor request will still be sent to the server but it will not be executed once a matching cursor is found in the session cursor cache.  打开的游标请求仍将发送到服务器,但是一旦在会话游标缓存中找到匹配的游标,便不会执行。

5. HOLD_CURSOR is an precompiler parameter that specifies that an individual cursor should be held open. See: HOLD_CURSOR是一个预编译器参数,用于指定应将单个游标保持打开状态

Document 2055810.6 Precompiler HOLD_CURSOR and RELEASE_CURSOR Options
Oracle® Database Programmer's Guide to the Oracle Precompilers
11g Release 2 (11.2)
Part Number E10830-01
6 Running the Oracle Precompilers

HOLD_CURSOR
Page 11-3 of the Programmer's guide to the Oracle Precompilers.  面向Oracle预编译器的程序员指南的第11-3页。

6. Both the soft and hard parse register as a parse in tkprof. Hashing the current statement updates the parse count.  软解析和硬解析都在tkprof中注册为解析。散列当前语句将更新解析计数。

7. Soft parse avoids many of the steps taken during the parse phase for a particular statement. Initial syntactic and semantic checks are made and then the statement is hashed and compared with hashed statements in the SQL area. If a match is found, then existing information is used and relatively expensive steps (such as query optimization etc.) are avoided.  软解析避免了在解析阶段针对特定语句采取的许多步骤。首先进行语法和语义检查,然后对该语句进行哈希处理,并与SQL区域中的哈希语句进行比较。如果找到匹配项,则使用现有信息并避免相对昂贵的步骤(例如查询优化等)。

8. The 10053 event is only invoked during a hard parse.  仅在硬解析期间调用10053事件。

9. Adaptive cursor sharing is a variation that occurs within the soft parse step to allow multiple plans to be stored for the same SQL representing the middle ground between cursor sharing and optimization. For more details see:  自适应游标共享是在软解析步骤中发生的一种变体,它允许针对同一SQL存储多个计划,这些计划表示游标共享和优化之间的中间立场。有关更多详细信息,请参见

Document 1115994.1 Introduction to Adaptive Cursor Sharing concepts in 11G and mutimedia demo [Video]
Document 836256.1 Adaptive Cursor Sharing in 11G
Document 740052.1 Adaptive Cursor Sharing: Overview

Oracle® Database Performance Tuning Guide
11g Release 2 (11.2)
Part Number E16638-06

11.1.3.1 Adaptive Cursor Sharing

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值