ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle Outline

Oracle Outline

原创 Linux操作系统 作者:boyall111 时间:2011-04-15 10:36:03 0 删除 编辑

USE_STORED_OUTLINES   参数

This section describes system parameters. These parameters are not initialization parameters, so you cannot set them in a pfile or spfile. However, you can set them using an ALTER SYSTEM statement.
有些参数是系统参数但不是初始化参数,不能通过pfile或者spfile来修改,但是可以通过alter system 语句来修改。
USE_STORED_OUTLINES 
Syntax: USE_STORED_OUTLINES = { TRUE | FALSE | category_name }

The USE_STORED_OUTLINES parameter determines whether the optimizer will use stored public outlines to generate execution plans. USE_STORED_OUTLINES is not an initialization parameter.
? TRUE causes the optimizer to use outlines stored in the DEFAULT category when compiling requests.
? FALSE specifies that the optimizer should not use stored outlines. This is the default.
? category_name causes the optimizer to use outlines stored in the category_name category when compiling requests.
检查方法:select * from dba_outlines ;

 需要知道如何确认?这个outline 生效;

创建oultine需要下面的权限
grant  CREATE ANY OUTLINE to Hr;

SQL> select name,owner,category ,used from dba_outlines;
NAME            OWNER           CATEGORY                       USED
--------------- --------------- ------------------------------ ------

SQL> alter system set  USE_STORED_OUTLINES=false; 
System altered   【在这个参数设置为false时,outline并没有生效,见下面的列子】

SQL> CREATE OUTLINE salaries  ON SELECT last_name, salary FROM hr.employees;
 
Outline created
 
SQL> select name,owner,category ,used from dba_outlines;
NAME            OWNER           CATEGORY                       USED
--------------- --------------- ------------------------------ ------
SALARIES        SYS             DEFAULT                        UNUSED
SQL> select last_name,salary from hr.employees;
LAST_NAME                     SALARY
------------------------- ----------
OConnell                     2600.00
Grant                        2600.00
SQL> select name,owner,category ,used from dba_outlines;
NAME            OWNER           CATEGORY                       USED
--------------- --------------- ------------------------------ ------
SALARIES        SYS             DEFAULT                        UNUSED


SQL> alter system set  USE_STORED_OUTLINES=true;
System altered
【在这个参数设置为true时,outline才会生效,见下面的列子】
 
SQL>  select last_name,salary from hr.employees;
 
LAST_NAME                     SALARY
------------------------- ----------
OConnell                     2600.00
Grant                        2600.00

SQL> select name,owner,category ,used from dba_outlines;
 
NAME            OWNER           CATEGORY                       USED
--------------- --------------- ------------------------------ ------
SALARIES        SYS             DEFAULT                        USED
 

===========将outline 存储在其他catalog中
 SQL> alter system set use_stored_outlines=special;
 
System altered
 
SQL> CREATE OUTLINE outline2  FOR CATEGORY special   ON SELECT count(*) FROM hr.departments;
 
Outline created
 
SQL> select name,owner,category ,used from dba_outlines;
 
NAME            OWNER           CATEGORY                       USED
--------------- --------------- ------------------------------ ------
SALARIES        SYS             DEFAULT                        USED
OUTLINE2        SYS             SPECIAL                        UNUSED
 
SQL>  SELECT count(*) FROM hr.departments;
 
  COUNT(*)
----------
        27
 
SQL> select name,owner,category ,used from dba_outlines;
 
NAME            OWNER           CATEGORY                       USED
--------------- --------------- ------------------------------ ------
SALARIES        SYS             DEFAULT                        USED
OUTLINE2        SYS             SPECIAL                        USED
SYS_OUTLINE_110 SYS             DEFAULT                        UNUSED
30713192214307                                                
 
SQL> 

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

上一篇: 通过OCM认证
请登录后发表评论 登录
全部评论

注册时间:2010-03-03

  • 博文量
    15
  • 访问量
    19937