您的位置:首页 > 其它

examine c 1-20 执行计划的一些概念

2015-12-21 21:30 218 查看
2.which statements are true ?

a.the data dictionary is created and maintained by the database administrtor

多少次了,是由oracle服务器创建和维护的(除了审计相关的数据字典aud$开头的,这些表示可以修改的)

b.the data dictionary views can consist of joins of dictionary base tables and user-defiend tables

数据字典视图总结了基础表的信息,而不是由他们组成

c.the usernames of all the users including the database administrtors are stored in the data dictionary

d.the user_cons_columns view should be queried top find the names of the columns to which a constraint applies

用来查询有约束应用于列的列名

e.both user_objexts and cat views provide the same information about all the objects that owned by the user

数据字典user_catlog有一个别名叫cat.用户可以用它得到与usr_catlog完全相同的信息

f.views with the same name but different prefixes ,such as dba.all the ueer,use the samen base tables from the data dictioanry

dba和all表多了owner列,其他结构一致,内容随权限不同而不同,都是基于数据字典中同一张基础之上

3.the user scott who is the owner of orders and order_items tables issues the following grant command;

grant all on orders,order_items to public

what correction needs to be done to the above statement?

d.separate grant statements are required for orders and order_items tables

对orders表和orders_items表的授权要使用单独的grant命令

7.which is true?

a.it returns of orws only whthin a transation

只要undo空间足够大就可以查询到多个版本

b.it can be used in subqueries contained only on a select statement

可以用在子查询。。createtable等

c.it returns an error if the undo retention time is less than the lower bound time or scn specified

如果查询的时间比undo更早,返回最早版本的的,并不会因此报错

20.which statements are true regarding the usage of the with clause in complex correlated subqueries?

a.it can be used only with the select caluse

with定义查询块只能被select使用,不能用于其他dml语句

b.the with clause can hold more than one query

当然可以有子查询

c.if the query block name and the table name were the same,then the table name would take precedence

查询名和表名重复会产生错误

d.the query name in the with clause is visible to other query blocks in the with clause as well as to the main query block

with定义的查询快可以被主查询和其后的with使用

序号
命令
解释
1
SET AUTOTRACE OFF
此为默认值,即关闭Autotrace 
2
SET AUTOTRACE ON EXPLAIN
只显示执行计划
3
SET AUTOTRACE ON STATISTICS
 只显示执行的统计信息
4
SET AUTOTRACE ON
 包含2,3两项内容
5
SET AUTOTRACE TRACEONLY
 与ON相似,但不显示语句的执行结果

 AUTOTRACE Statistics列解释

序号
列名
解释
1

recursive calls
递归调查
2

db block gets
从buffer cache中读取的block的数量
3
consistent gets
从buffer cache中读取的undo数据的block的数量
4
physical reads
从磁盘读取的block的数量
5
redo size
DML生成的redo的大小
6
sorts (memory)
在内存执行的排序量
7
sorts (disk)
在磁盘上执行的排序量
在使用了append选项以后,insert数据会直接加到表的最后面,而不会在表的空闲块中插入数据。

使用append会增加数据插入的速度。
/*+APPEND*/的作用是在表的高水位上分配空间,不再使用表的extent中的空余空间
不去寻找 freelist 中的free block , 直接在table HWM 上面加入数据。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: