OCP 1Z0 053 54
来源:互联网 发布:mac无法读取u盘 编辑:程序博客网 时间:2024/05/22 00:23
CREATE FUNCTION get_dept_avg(dept_id NUMBER) RETURN NUMBER RESULT_CACHE
RELIES_ON
(EMPLOYEES) IS avgsal NUMBER(6);
BEGIN
SELECT AVG(SALARY)INTO avgsal
FROM EMPLOYEES
WHERE DEPARTMENT_ID = dept_id;
RETURN avgsal;
END get_dept_avg;
Which statement is true regarding the above function?
A. The cached result becomes invalid when any structural change is done to the EMPLOYEES table.
B. If the function execution results in an unhandled exception, the exception result is also stored in the
cache.
C. Each time the function is invoked in a different session, the current result in the result cache gets
overwritten.
D. If the function is invoked with a different parameter value, the existing result in the result cache gets
overwritten by the latest value.
Answer: A
任何可能引起数据变动的操作都会使RESULT_CACHE 失效。这样可以保证数据的正确性。
http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/subprograms.htm#LNPLS708
Result Cache Bypass
In some situations, the cache is bypassed. When the cache is bypassed:
The function computes the result instead of retrieving it from the cache.
The result that the function computes is not added to the cache.
Some examples of situations in which the cache is bypassed are:
The cache is unavailable to all sessions.
For example, the database administrator has disabled the use of the result cache during application patching (as in "Hot-Patching PL/SQL Units on Which Result-Cached Functions Depend").
A session is performing a DML statement on a table or view on which a result-cached function depends.
The session bypasses the result cache for that function until the DML statement is completed—either committed or rolled back. If the statement is rolled back, the session resumes using the cache for that function.
Cache bypass ensures that:
The user of each session sees his or her own uncommitted changes.
The PL/SQL function result cache has only committed changes that are visible to all sessions, so that uncommitted changes in one session are not visible to other sessions.
- OCP 1Z0 053 54
- OCP 1Z0 053 1
- OCP 1Z0 051 54
- OCP 1Z0 052 54
- OCP 1Z0 053 2
- OCP 1Z0 053 3
- OCP 1Z0 053 4
- OCP 1Z0 053 5
- OCP 1Z0 053 6
- OCP 1Z0 053 7
- OCP 1Z0 053 8
- OCP 1Z0 053 9
- OCP 1Z0 053 10
- OCP 1Z0 053 11
- OCP 1Z0 053 12
- OCP 1Z0 053 13
- OCP 1Z0 053 14
- OCP 1Z0 053 15
- FTP账号添加
- ios中文件的相关操作:读,写,删除
- shell字符处理的几个函数
- CPU寻址范围
- 宝宝床,您选对了吗
- OCP 1Z0 053 54
- Hadoop的核心思想
- 据听说石家庄有个牛叉的大学,叫石家庄信息工程职业学院
- msxml dom 全解析
- storm源代码编译 及lein用法
- Alex 的 Hadoop 菜鸟教程: 第5课 YARN 安装以及helloworld (基于centos的CDH)
- 隐式共享---转自zhu_xz
- JX8NET 小游戏 上图中的三棵 BST 树中
- awk数据处理的几个函数