eygle.com   eygle.com
eygle.com  
 

« October 20, 2008 | Blog首页 | October 22, 2008 »



October 21, 2008

cursor_space_for_time参数在11.1.0.7中

作者:eygle

出处:http://blog.eygle.com

前几天我曾经提到,在10.2.0.5 and 11.1.0.7中,Oracle将会废弃cursor_space_for_time参数。

今天有了11.1.0.7环境,首先就来看看这个参数的变化:
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE    11.1.0.7.0      Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production

首先这个参数仍然存在,也继续可以设置:
SQL> alter system set cursor_space_for_time=true;
alter system set cursor_space_for_time=true
                *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set cursor_space_for_time=true scope=spfile;

System altered.

但是在下一次启动过程中,Oracle会提示你设置了废弃的参数:
SQL> startup force;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area  523108352 bytes
Fixed Size                  1314492 bytes
Variable Size            373293380 bytes
Database Buffers          142606336 bytes
Redo Buffers                5894144 bytes
Database mounted.
Database opened.
SQL> show parameter cursor

NAME                                TYPE        VALUE
------------------------------------ ----------- ------------------------------
cursor_sharing                      string      EXACT
cursor_space_for_time                boolean    TRUE
open_cursors                        integer    300
session_cached_cursors              integer    50

检查告警日志,可以发现如下信息,有问题的参数被清晰列举出来:
Deprecated system parameters with specified values:
  cursor_space_for_time
End of deprecated system parameter listing
Mon Oct 20 12:26:15 2008
PMON started with pid=2, OS id=32638

cursor_space_for_time参数缺省值为FALSE:
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
  2    FROM SYS.x$ksppi x, SYS.x$ksppcv y
  3  WHERE x.indx = y.indx
  4    AND x.ksppinm LIKE '%&par%'
  5  /
Enter value for par: cursor_space
old  4:    AND x.ksppinm LIKE '%&par%'
new  4:    AND x.ksppinm LIKE '%cursor_space%'

NAME                          VALUE                DESCRIB
------------------------------ -------------------- ------------------------------------------------------------
cursor_space_for_time          FALSE                use more memory in order to get faster execution

替代这个参数的另外一个参数是_fast_cursor_reexecute,如果想要得到之前类似cursor_space_for_time参数的功能,可以使用这个新的隐含参数:
SQL> /
Enter value for par: fast_cursor_reexecute
old  4:    AND x.ksppinm LIKE '%&par%'
new  4:    AND x.ksppinm LIKE '%fast_cursor_reexecute%'

NAME                          VALUE                DESCRIB
------------------------------ -------------------- ------------------------------------------------------------
_fast_cursor_reexecute        FALSE                use more memory in order to get faster execution

-The End-

Posted by eygle at 10:31 AM | Comments (3)



CopyRight © 2004-2008 eygle.com, All rights reserved.