ITPub博客

首页 > 数据库 > Oracle > 052-014题解析

052-014题解析

原创 Oracle 作者:pxbibm 时间:2014-03-31 15:50:17 0 删除 编辑
 

14.

These are points that describe the contents of different memory components:

1: Descriptive information or metadata about schema objects that are queried by using SQL statements

2: The run-time area for data manipulation language (DML) or data definition language (DDL) statements

3: Results of SQL queries and PL/SQL functions

4: Executable forms of SQL cursors, PL/SQL programs, and Java classes

5: The information necessary to reconstruct changes made to the database by a transaction

Which of these will be stored in the Shared Pool if the necessary configurations are done?

A.1 and 2

B.2 and 5

C.1, 3, and 4

D.3, 4, and 5

E.1, 2, 3, and 4

Answer: C  

答案解析:

本题考得是Shared Pool 内存作用。
理解的SQL的软解析与硬解析的区别,该题就简单了。
Hard Parse: 就是上面提到的对提交的Sql完全重新从头进行解析(当在Shared Pool中找不到时候将会进行此操作),总共有一下5个执行步骤:

    1:语法分析

    2:权限与对象检查

    3: 在共享池中检查是否有完全相同的之前完全解析好的. 如果存在,直接跳过4和5,运行Sql, 此时算soft parse.

    4:选择执行计划

    5:产生执行计划

注:创建解析树、生成执行计划对于sql的执行来说是开销昂贵的动作,所以,应当极力避免硬解析,尽量使用软解析。这就是在很多项目中,倡导开发设计人员对功能相同的代码要努力保持代码的一致性,以及要在程序中多使用绑定变量的原因。
Soft Parse: 就如果是在Shared Pool中找到了与之完全相同的Sql解析好的结果后会跳过Hard Parse中的后面的两个步骤。


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12798004/viewspace-1133312/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 052-013题解析
下一篇: 052-015题解析
请登录后发表评论 登录
全部评论
【DBAplus社群】联合发起人。ACOUG核心成员,Oracle用户组年轻专家。熟悉Oracle的体系结构,擅长Oracle数据库架构规划、SQL优化、OWI方面性能的优化。曾服务于航天、航空、机车、大型制造行业数据库的维护以及系统开发工作,开发过基于Oracle数据库的大型ERP系统。
  • 博文量
    341
  • 访问量
    2469686