Oracle Outline是用来保持SQL执行计划(execution plan)的一个工具。我们可以通过outline工具防止SQL执行计划在数据库环境变更(如统计信息,部分参数等)而引起变化。
Outline的主要使用在以下情况:
1.
为避免在升级后某些sql出现严重性能下降而且在短时间内不能优化的情况,
我们可以使用outline的功能将原生产库中的sql执行计划实施在新的数据库上。
2.
为避免SQL的执行计划在统计数据不准确的情况(如未能及时收集表或索引的统计信息)下导致变化从而引起的性能降低。
3.
避免大规模分布实施的应用出现数据库版本、配置等区别引起的优化器产生不同的执行计划。
4.
某些Bug引起优化器生成较差的执行计划。在bug修复前我们可以使用outline来强制SQL的执行计划的正确。
Outline的机制是将所需要的执行计划的hint保存在outline的表中。当执行SQL时,Oracle会与outline中的SQL比较,如果该SQL有保存的outline,则通过保存的hint生成执行计划。
Outline的使用注意事项
Outline的使用需要注意以下事项。
1.
Outln用户是一个非常重要的系统用户,其重要性跟sys,system一样。在任何情况下都不建议用户删除outln,否则会引起数据库错误。
2.
优化器通过Outline生成执行计划前提是outline内所有hint都有效的。如:索引没有创建的前提下,索引的hint是失效的,导致该SQL的outline计划不会被使用。
3.
参数Cursor_sharing=force时不能使用outline。
4.
literial sql的共享程度不高,Outline针对绑定变量的sql较好。针对literial sql的情况,需要每条sql都生成outline。
5.
创建outline需要有create any outline的权限。
6.
要注意从CBO的角度来看,数据库表和索引的统计信息是随着数据量的变化而不断改变的。固定的执行计划在某些时段并不一定是最优的执行计划。所以outline的使用是要根据具体情况来决定的。
Outline使用举例
本文举例说明如何使用outline,并且将outline的内容从8i迁移到10g的数据库上使用。
操作步骤以scott用户为例说明。
8i,10g中在scott用户下创建测试表以说明outline的使用.
Login as scott
Create table t_test(col1 varchar2(2));
1.
确定8i生产库的db,listener处于关闭的状态。
2.
启动8i生产库instance.
3.
8i库使用system用户登陆,赋create any outline权限给sql执行用户。
Grant create any outline to scott;
4.
8i库使用scott用户登陆。
Create outline t_ol1 for category special on select * from t_test where col1=’00’;
T_ol1àoutline name
(注意每个outline都需要使用唯一的名字,不能重复)
Specialàoutline所属的类(category)
Select * from t_test where col1=’00’;à需要保存outline的sql
5.
10g,8i库Unlock并修改outlin用户口令。注意,outln用户的口令可以修改但是outln用户不能删除。
Alter user outln identified by outln account unlock;
6.
在8i库使用outln用户,导出outline数据。
Exp outln/outln tables=ol/$ ol/$hints file=ol.dmp log=ol_exp.log
将export的数据拷贝到10g库所在机器
7.
在10g库使用outln用户导入outline数据
imp outln/outln file=ol.dmp ignore=y log=ol_imp.log
8.
在10g库使用sys用户更新ouline的signature
connect sys/manager
exec dbms_outln.update_signatures;
启用stored outline
alter system set use_stored_outlines=special;
à指定outline category
9.
检测outline是否被使用
connect scott/tiger
create index I_test on t_test (col1);
à创建索引,以改变执行计划
explain plan for select * from t_test where col1=’00’;
@?/rdbms/admin/utlxplp
PLAN_TABLE_OUTPUT
Plan hash value: 4036493941
----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | select STATEMENT | | 1 | 3 | 1200 (4) | 00:00:17 |
|*1 |TABLE ACCESS FULL | T_TEST | 1 | 3 | 1200 (4) | 00:00:17 |
----------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("COL1"='00')
Note
-----
- outline "OL1" used for this statement
à
注意执行计划指出online已经使用
17 rows selected.
说明outline已经启用。
如果没有outline的情况下应该使用索引,执行计划如下。
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 614253159
---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | select STATEMENT | | 1 | 3 | 3 (0) | 00:00:01 |
|* 1 | INDEX RANGE SCAN| I_TEST | 1 | 3 | 3 (0) | 00:00:01 |
---------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("COL1"='00')
Outline维护
停止db使用outline功能:
alter system set use_stored_outlines=false;
disable/enable具体outline:
alter outline ol_name disable;
alter outline ol_name enable;
删除outline category:
9i, 10g: exec dbms_outln.drop_by_cat(‘category_name’);
8i: exec outln_pkg.drop_by_cat(‘category_name’);
outline相关视图
dba_outlines
检查outline是否存在
select
name, category, owner from dba_outlines;
dba_outline_hints
该视图列出outline的hints内容
----------------------------------------------------------------------------------------------------------------
转载地址:http://www.linuxidc.com/Linux/2012-07/66708.htm
为指定的sql创建outline
USE_STORED_OUTLINES
Syntax:
USE_STORED_OUTLINES = { TRUE | FALSE | category_name }
this 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.重启后需要重新设置。
lau为创建outline的用户,即我们的应用用户。
1.SQL> conn sys/Oracle@orcl as sysdba
2.已连接。
3.
4.--1.为创建outline用户赋权CREATE ANY OUTLINE
5.SQL> grant CREATE ANY OUTLINE to lau;
6.
7.授权成功。
8.
9.SQL> conn lau/lau@orcl
10.已连接。
11.
12.SQL> create table t (id int);
13.
14.表已创建。
15.
16.SQL> insert into t select level from dual connect by level <=10000;
17.
18.已创建10000行。
19.
20.SQL> commit;
21.
22.提交完成。
23.
24.SQL> set autot traceonly
25.SQL> select * from t where id=1;
26.
27.
28.执行计划
29.----------------------------------------------------------
30.Plan hash value: 1601196873
31.
32.--------------------------------------------------------------------------
33.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
34.--------------------------------------------------------------------------
35.| 0 | SELECT STATEMENT | | 1 | 13 | 6 (0)| 00:00:01 |
36.|* 1 | TABLE ACCESS FULL| T | 1 | 13 | 6 (0)| 00:00:01 |
37.--------------------------------------------------------------------------
38.
39.Predicate Information (identified by operation id):
40.---------------------------------------------------
41.
42. 1 - filter("ID"=1)
43.
44.Note
45.-----
46. - dynamic sampling used for this statement
47.
48.
49.统计信息
50.----------------------------------------------------------
51. 5 recursive calls
52. 0 db block gets
53. 48 consistent gets
54. 0 physical reads
55. 0 redo size
56. 402 bytes sent via SQL*Net to client
57. 385 bytes received via SQL*Net from client
58. 2 SQL*Net roundtrips to/from client
59. 0 sorts (memory)
60. 0 sorts (disk)
61. 1 rows processed
62.
63.--2.创建两个测试outline
64.SQL> create or replace outline test_outline1 for category cate_outline
65. 2 on select * from t where id=1;
66.
67.大纲已创建。
68.
69.SQL> create or replace outline test_outline2 for category cate_outline
70. 2 on select * from t where id=2;
71.
72.大纲已创建。
73.
74.--3.查看该用户下创建的outline。
75.SQL> col name for a20
76.SQL> col sql_text for a50
77.SQL> col used for a10
78.SQL> set autot off
79.SQL> set linesize 200
80.SQL> select name, sql_text ,used,category
81. 2 from user_outlines
82. 3 where category=upper('cate_outline');
83.
84.NAME SQL_TEXT USED CATEGORY
85.-------------------- -------------------------------------------------- ---------- ------------------------------
86.TEST_OUTLINE2 select * from t where id=2 UNUSED CATE_OUTLINE
87.TEST_OUTLINE1 select * from t where id=1 UNUSED CATE_OUTLINE
88.
89.--4.使cate_outline下的outline生效
90.SQL> alter system set USE_STORED_OUTLINES =cate_outline;
91.
92.系统已更改。
93.
94.SQL> select name, sql_text ,used,category
95. 2 from user_outlines
96. 3 where category=upper('cate_outline');
97.
98.NAME SQL_TEXT USED CATEGORY
99.-------------------- -------------------------------------------------- ---------- ------------------------------
100.TEST_OUTLINE2 select * from t where id=2 UNUSED CATE_OUTLINE
101.TEST_OUTLINE1 select * from t where id=1 UNUSED CATE_OUTLINE
102.
103.SQL> set autot explain
104.用法: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
105.SQL> set autot on explain
106.SQL> select * from t where id=1;
107.
108. ID
109.----------
110. 1
111.
112.
113.执行计划
114.----------------------------------------------------------
115.Plan hash value: 1601196873
116.
117.--------------------------------------------------------------------------
118.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
119.--------------------------------------------------------------------------
120.| 0 | SELECT STATEMENT | | 1 | 13 | 2 (0)| 00:00:01 |
121.|* 1 | TABLE ACCESS FULL| T | 1 | 13 | 2 (0)| 00:00:01 |
122.--------------------------------------------------------------------------
123.
124.Predicate Information (identified by operation id):
125.---------------------------------------------------
126.
127. 1 - filter("ID"=1)
128.
129.Note
130.-----
131. - outline "TEST_OUTLINE1" used for this statement --说明已经使用了我们创建的outline.
132.
133.SQL> select * from t where id=2;
134.
135. ID
136.----------
137. 2
138.
139.
140.执行计划
141.----------------------------------------------------------
142.Plan hash value: 1601196873
143.
144.--------------------------------------------------------------------------
145.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
146.--------------------------------------------------------------------------
147.| 0 | SELECT STATEMENT | | 1 | 13 | 2 (0)| 00:00:01 |
148.|* 1 | TABLE ACCESS FULL| T | 1 | 13 | 2 (0)| 00:00:01 |
149.--------------------------------------------------------------------------
150.
151.Predicate Information (identified by operation id):
152.---------------------------------------------------
153.
154. 1 - filter("ID"=2)
155.
156.Note
157.-----
158. - outline "TEST_OUTLINE2" used for this statement
159.
160.--以下没有使用outline,因为没有绑定变量。
161.SQL> select * from t where id=3;
162.
163. ID
164.----------
165. 3
166.
167.
168.执行计划
169.----------------------------------------------------------
170.Plan hash value: 1601196873
171.
172.--------------------------------------------------------------------------
173.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
174.--------------------------------------------------------------------------
175.| 0 | SELECT STATEMENT | | 1 | 13 | 6 (0)| 00:00:01 |
176.|* 1 | TABLE ACCESS FULL| T | 1 | 13 | 6 (0)| 00:00:01 |
177.--------------------------------------------------------------------------
178.
179.Predicate Information (identified by operation id):
180.---------------------------------------------------
181.
182. 1 - filter("ID"=3)
183.
184.Note
185.-----
186. - dynamic sampling used for this statement
187.
188.--创建索引,验证outline的使用,sql依然使用全表扫描。
189.SQL> create index ind_t_id on t(id);
190.
191.索引已创建。
192.
193.SQL> select * from t where id=1;
194.
195. ID
196.----------
197. 1
198.
199.
200.执行计划
201.----------------------------------------------------------
202.Plan hash value: 1601196873
203.
204.--------------------------------------------------------------------------
205.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
206.--------------------------------------------------------------------------
207.| 0 | SELECT STATEMENT | | 1 | 13 | 2 (0)| 00:00:01 |
208.|* 1 | TABLE ACCESS FULL| T | 1 | 13 | 2 (0)| 00:00:01 |
209.--------------------------------------------------------------------------
210.
211.Predicate Information (identified by operation id):
212.---------------------------------------------------
213.
214. 1 - filter("ID"=1)
215.
216.Note
217.-----
218. - outline "TEST_OUTLINE1" used for this statement
219.
220.--禁用outline之后,sql使用了索引
221.SQL> alter system set USE_STORED_OUTLINES =false;
222.
223.系统已更改。
224.
225.SQL> select * from t where id=1;
226.
227. ID
228.----------
229. 1
230.
231.
232.执行计划
233.----------------------------------------------------------
234.Plan hash value: 3343177607
235.
236.-----------------------------------------------------------------------------
237.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
238.-----------------------------------------------------------------------------
239.| 0 | SELECT STATEMENT | | 1 | 13 | 1 (0)| 00:00:01 |
240.|* 1 | INDEX RANGE SCAN| IND_T_ID | 1 | 13 | 1 (0)| 00:00:01 |
241.-----------------------------------------------------------------------------
242.
243.Predicate Information (identified by operation id):
244.---------------------------------------------------
245.
246. 1 - access("ID"=1)
247.
248.Note
249.-----
250. - dynamic sampling used for this statement
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2012-07/66708.htm
outline for 绑定变量
1.获取带绑定变量sql的 child_number,hash_value
select child_number,hash_value,address,sql_text from v$sql
where sql_text like 'select * from t where id%';
2.创建outline
begin
dbms_outln.create_outline (
hash_value =>3573770389,
child_number =>0,
category =>'CATE_OUTLINE');
end;
/
1.SQL> var v_id number;
2.SQL> exec :v_id :=5;
3.
4.PL/SQL 过程已成功完成。
5.
6.提交完成。
7.SQL> set autot traceonly
8.SQL> select * from t where id=:v_id;
9.
10.
11.执行计划
12.----------------------------------------------------------
13.Plan hash value: 1601196873
14.
15.--------------------------------------------------------------------------
16.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
17.--------------------------------------------------------------------------
18.| 0 | SELECT STATEMENT | | 100 | 1300 | 7 (15)| 00:00:01 |
19.|* 1 | TABLE ACCESS FULL| T | 100 | 1300 | 7 (15)| 00:00:01 |
20.--------------------------------------------------------------------------
21.
22.Predicate Information (identified by operation id):
23.---------------------------------------------------
24.
25. 1 - filter("ID"=TO_NUMBER(:V_ID))
26.
27.Note
28.-----
29. - dynamic sampling used for this statement
30.
31.
32.统计信息
33.----------------------------------------------------------
34. 0 recursive calls
35. 0 db block gets
36. 0 consistent gets
37. 0 physical reads
38. 0 redo size
39. 0 bytes sent via SQL*Net to client
40. 0 bytes received via SQL*Net from client
41. 0 SQL*Net roundtrips to/from client
42. 0 sorts (memory)
43. 0 sorts (disk)
44. 1 rows processed
45.
46.SQL> col child_number for 999999999999
47.SQL> col hash_values for 999999999999
48.SQL> col hash_value for 999999999999
49.SQL> col address for a20
50.SQL> col sql_text for a50
51.SQL> set linesize 200
52.
53.SQL> select child_number,hash_value,address,sql_text from v$sql
54. 2 where sql_text like 'select * from t where id%';
55.
56. CHILD_NUMBER HASH_VALUE ADDRESS SQL_TEXT
57.------------- ------------- -------------------- --------------------------------------------------
58. 0 3573770389 22E58344 select * from t where id=:v_id
59.
60.SQL> begin
61. 2 dbms_outln.create_outline (
62. 3 hash_value =>3573770389,
63. 4 child_number =>0,
64. 5 category =>'CATE_OUTLINE');
65. 6 end;
66. 7 /
67.
68.PL/SQL 过程已成功完成。
69.
70.提交完成。
71.SQL> select name, sql_text ,used,category
72. 2 from user_outlines
73. 3 where category=upper('cate_outline');
74.
75.NAME SQL_TEXT USED CATEGORY
76.-------------------- -------------------------------------------------- ---------- ------------------------------
77.SYS_OUTLINE_12071817 select * from t where id=:v_id UNUSED CATE_OUTLINE
78.153216201
79.
80.SQL> alter system set USE_STORED_OUTLINES =cate_outline;
81.
82.系统已更改。
83.
84.SQL> set autot traceonly
85.
86.SQL> exec :v_id :=1;
87.
88.PL/SQL 过程已成功完成。
89.
90.提交完成。
91.SQL> select * from t where id=:v_id;
92.
93.
94.执行计划
95.----------------------------------------------------------
96.Plan hash value: 1601196873
97.
98.--------------------------------------------------------------------------
99.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
100.--------------------------------------------------------------------------
101.| 0 | SELECT STATEMENT | | 16 | 208 | 6 (0)| 00:00:01 |
102.|* 1 | TABLE ACCESS FULL| T | 16 | 208 | 6 (0)| 00:00:01 |
103.--------------------------------------------------------------------------
104.
105.Predicate Information (identified by operation id):
106.---------------------------------------------------
107.
108. 1 - filter("ID"=TO_NUMBER(:V_ID))
109.
110.Note
111.-----
112. - outline "SYS_OUTLINE_12071817153216201" used for this statement
113.
114.
115.统计信息
116.----------------------------------------------------------
117. 35 recursive calls
118. 123 db block gets
119. 44 consistent gets
120. 0 physical reads
121. 632 redo size
122. 402 bytes sent via SQL*Net to client
123. 385 bytes received via SQL*Net from client
124. 2 SQL*Net roundtrips to/from client
125. 2 sorts (memory)
126. 0 sorts (disk)
127. 1 rows processed
128.
129.SQL> exec :v_id :=10;
130.
131.PL/SQL 过程已成功完成。
132.
133.提交完成。
134.SQL> select * from t where id=:v_id;
135.
136.
137.执行计划
138.----------------------------------------------------------
139.Plan hash value: 1601196873
140.
141.--------------------------------------------------------------------------
142.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
143.--------------------------------------------------------------------------
144.| 0 | SELECT STATEMENT | | 16 | 208 | 6 (0)| 00:00:01 |
145.|* 1 | TABLE ACCESS FULL| T | 16 | 208 | 6 (0)| 00:00:01 |
146.--------------------------------------------------------------------------
147.
148.Predicate Information (identified by operation id):
149.---------------------------------------------------
150.
151. 1 - filter("ID"=TO_NUMBER(:V_ID))
152.
153.Note
154.-----
155. - outline "SYS_OUTLINE_12071817153216201" used for this statement
156.
157.
158.统计信息
159.----------------------------------------------------------
160. 0 recursive calls
161. 0 db block gets
162. 24 consistent gets
163. 0 physical reads
164. 0 redo size
165. 402 bytes sent via SQL*Net to client
166. 385 bytes received via SQL*Net from client
167. 2 SQL*Net roundtrips to/from client
168. 0 sorts (memory)
169. 0 sorts (disk)
170. 1 rows processed
171.
172.SQL> create index ind_t_id on t(id);
173.
174.索引已创建。
175.
176.SQL> comment on column t.id is 'dddd';
177.
178.注释已创建。
179.
180.SQL> select * from t where id=:v_id;
181.
182.
183.执行计划
184.----------------------------------------------------------
185.Plan hash value: 1601196873
186.
187.--------------------------------------------------------------------------
188.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
189.--------------------------------------------------------------------------
190.| 0 | SELECT STATEMENT | | 16 | 208 | 6 (0)| 00:00:01 |
191.|* 1 | TABLE ACCESS FULL| T | 16 | 208 | 6 (0)| 00:00:01 |
192.--------------------------------------------------------------------------
193.
194.Predicate Information (identified by operation id):
195.---------------------------------------------------
196.
197. 1 - filter("ID"=TO_NUMBER(:V_ID))
198.
199.Note
200.-----
201. - outline "SYS_OUTLINE_12071817153216201" used for this statement
202.
203.
204.统计信息
205.----------------------------------------------------------
206. 1 recursive calls
207. 0 db block gets
208. 24 consistent gets
209. 0 physical reads
210. 0 redo size
211. 402 bytes sent via SQL*Net to client
212. 385 bytes received via SQL*Net from client
213. 2 SQL*Net roundtrips to/from client
214. 0 sorts (memory)
215. 0 sorts (disk)
216. 1 rows processed
217.
218.SQL> alter system set use_stored_outlines=false;
219.
220.系统已更改。
221.
222.SQL> select * from t where id=:v_id;
223.
224.
225.执行计划
226.----------------------------------------------------------
227.Plan hash value: 3343177607
228.
229.-----------------------------------------------------------------------------
230.| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
231.-----------------------------------------------------------------------------
232.| 0 | SELECT STATEMENT | | 100 | 1300 | 1 (0)| 00:00:01 |
233.|* 1 | INDEX RANGE SCAN| IND_T_ID | 100 | 1300 | 1 (0)| 00:00:01 |
234.-----------------------------------------------------------------------------
235.
236.Predicate Information (identified by operation id):
237.---------------------------------------------------
238.
239. 1 - access("ID"=TO_NUMBER(:V_ID))
240.
241.Note
242.-----
243. - dynamic sampling used for this statement
244.
245.
246.统计信息
247.----------------------------------------------------------
248. 13 recursive calls
249. 0 db block gets
250. 30 consistent gets
251. 4 physical reads
252. 0 redo size
253. 402 bytes sent via SQL*Net to client
254. 385 bytes received via SQL*Net from client
255. 2 SQL*Net roundtrips to/from client
256. 0 sorts (memory)
257. 0 sorts (disk)
258. 1 rows processed
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2012-07/66708p2.htm
USE_STORED_OUTLINES参数在实例重启后需要重新设置,有两种应对方法
1.使用登录触发器为单独的用户设置会话信息
1.SQL> conn lau/lau@oralife
2.已连接。
3.SQL> create or replace trigger tr_login
4. 2 after logon on database
5. 3 declare
6. 4 v_username varchar2(30);
7. 5 begin
8. 6 select SYS_CONTEXT('USERENV','SESSION_USER') into v_username from dual;
9. 7 if v_username = 'SCOTT' then
10. 8 execute immediate 'alter session set nls_date_format=''yyyy/mm/dd hh24:mi:ss''';
11. 9 end if;
12. 10 exception
13. 11 when others then
14. 12 null;
15. 13 end;
16. 14 /
17.
18.触发器已创建
19.
20.SQL> select sysdate from dual;
21.
22.SYSDATE
23.--------------
24.25-7月 -12
25.
26.SQL> conn scott/tiger@oralife
27.已连接。
28.SQL> select sysdate from dual;
29.
30.SYSDATE
31.-------------------
32.2012/07/25 20:26:10
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2012-07/66708p3.htm
在登录触发器中为特定的用户添加
execute immediate 'alter session set use_stored_outlines=cate_outline';
开启类cate_outline。
2.使用启动触发器开启系统级设置
1.SQL> conn sys/Oracle@oralife as sysdba
2.已连接。
3.SQL> create or replace trigger tr_login
4. 2 after STARTUP on database
5. 3 declare
6. 4 begin
7. 5 execute immediate 'alter system set nls_date_format=''yyyy/mm/dd hh24:mi:ss''';
8. 6 exception
9. 7 when others then
10. 8 null;
11. 9 end;
12. 10 /
13.
14.触发器已创建
15.
16.SQL> select sysdate from dual;
17.
18.SYSDATE
19.--------------
20.25-7月 -12
21.
22.--重启实例后,以上的设置并没有生效,但是添加
23.--execute immediate 'alter system set use_stored_outlines=cate_outline';
24.--之后的确会开启类cate_outline,使outline生效。
25.SQL> select sysdate from dual;
26.
27.SYSDATE
28.--------------
29.25-7月 -12 --没有生效
重启实例后,以上的设置并没有生效,但是将其替换为
execute immediate 'alter system set use_stored_outlines=cate_outline';
之后的确会开启类cate_outline,使outline生效。
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2012-07/66708p4.htm