Oracle 10g数据库中过程(PROCEDURE )重建的增强_Oracle数据库_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

Oracle10g中过程(PROCEDURE )重建的增强

作者:黑客防线网安Oracle维护基地 来源:黑客防线网安Oracle维护基地 浏览次数:0

黑客防线网安网讯:    在Oracle9i中,即使一个完全相同的过程的重建,Oracle也需要重新编译过程,这个可以从LAST_DDL_TIME看出:[oracle@jumper oracle]$ sqlplus eygle/eygle SQL*Plus: Release 9.2.0.4.0 -...

    在Oracle9i中即使一个完全相同的过程的重建Oracle也需要重新编译过程,这个可以从LAST_DDL_TIME看出:

[oracle@jumper oracle]$ sqlplus eygle/eygle SQL*Plus: Release 9.2.0.4.0 - ProdUCtion on Sat Mar 31 17:52:55 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production SQL> create or replace PROCEDURE pining
2 IS
3 BEGIN
4 NULL;
5 END;
6 / Procedure created. SQL> select object_name,last_ddl_time from dba_objects where object_name='PINING'; OBJECT_NAME LAST_DDL_TIME
------------------------------ -------------------
PINING 2007-03-31 17:52:58 SQL> create or replace PROCEDURE pining
2 IS
3 BEGIN
4 NULL;
5 END;
6 / Procedure created. SQL> select object_name,last_ddl_time from dba_objects where object_name='PINING'; OBJECT_NAME LAST_DDL_TIME
------------------------------ -------------------
PINING 2007-03-31 17:54:35

    在Oracle10g中,这个LAST_DDL_TIME不再变化,这说明在10g中,当我们执行create or replace PROCEDURE 时,Oracle现在先尝试进行过程检查,假如内容没有变化,则不需要对过程进行重新编译,这可以减少Cache中的Invalidation, 从而可以减少竞争:

$ sqlplus eygle/eygle SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 31 17:44:46 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options SQL> create or replace PROCEDURE pining
2 IS
3 BEGIN
4 NULL;
5 END;
6 / Procedure created. SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss'; Session altered. SQL> col object_name for a30
SQL> select object_name,last_ddl_time from dba_objects where object_name='PINING'; OBJECT_NAME LAST_DDL_TIME
------------------------------ -------------------
PINING 2007-03-31 17:45:25 SQL> create or replace PROCEDURE pining
2 IS
3 BEGIN
4 NULL;
5 END;
6 / Procedure created. SQL> select object_name,last_ddl_time from dba_objects where object_name='PINING'; OBJECT_NAME LAST_DDL_TIME
------------------------------ -------------------
PINING 2007-03-31 17:45:25

然而这个变化是否有效呢?请看我接下来的另外一个测试... -to be continued .... -----

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-12246-1.html
网站维护教程更新时间:2012-03-23 00:38:08  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer