昨天听一网友 feihuchina提进outline这个知识点,查了一下
A stored outline is a collection of hints associated with a specific SQL statement that allows a standard execution plan to be maintained, regardless of changes in the system environment or associated statistics. Plan stability is based on the preservation of execution plans at a point in time where the performance of a statement is considered acceptable. The outlines are stored in the
All of the caveats associated with optimizer hints apply equally to stored outlines. Under normal running the optimizer chooses the most suitable execution plan for the current circumstances. By using a stored outline you may be forcing the optimizer to choose a substandard execution plan, so you should monitor the affects of your stored outlines over time to make sure this isn't happening. Remember, what works well today may not tomorrow.
总体就是说Oracle Outline是用来保持SQL执行计划(execution plan)的一个工具。我们可以保存一个时间点的执行计划,用于数据改变或系统环境改变而限制cbo,rbo强行执行原保存的执行计划,注意的是,这个执行计划现在适用随着数据的变化明天不一定是最好的。
Outline的主要使用在以下情况:
1.为避免在升级后某些sql出现严重性能下降而且在短时间内不能优化的情况,
我们可以使用outline的功能将原生产库中的sql执行计划实施在新的数据库上。
2.为避免SQL的执行计划在统计数据不准确的情况(如未能及时收集表或索引的统计信息)下导致变化从而引起的性能降低。
3.避免大规模分布实施的应用出现数据库版本、配置等区别引起的优化器产生不同的执行计划。
4.某些Bug引起优化器生成较差的执行计划。在bug修复前我们可以使用outline来强制SQL的执行计划的正确。
Outline的机制是将所需要的执行计划的hint保存在outline的表中。当执行SQL时,Oracle会与outline中的SQL比较,如果该SQL有保存的outline,则通过保存的hint生成执行计划。
Outlines can be generated for specific statements using the
查询
A stored outline is a collection of hints associated with a specific SQL statement that allows a standard execution plan to be maintained, regardless of changes in the system environment or associated statistics. Plan stability is based on the preservation of execution plans at a point in time where the performance of a statement is considered acceptable. The outlines are stored in the
OL$
, OL$HINTS
, and OL$NODES
tables, but the [USER|ALL|DBA]_OUTLINES
and [USER|ALL|DBA]_OUTLINE_HINTS
views should be used to display information about existing outlines.All of the caveats associated with optimizer hints apply equally to stored outlines. Under normal running the optimizer chooses the most suitable execution plan for the current circumstances. By using a stored outline you may be forcing the optimizer to choose a substandard execution plan, so you should monitor the affects of your stored outlines over time to make sure this isn't happening. Remember, what works well today may not tomorrow.
总体就是说Oracle Outline是用来保持SQL执行计划(execution plan)的一个工具。我们可以保存一个时间点的执行计划,用于数据改变或系统环境改变而限制cbo,rbo强行执行原保存的执行计划,注意的是,这个执行计划现在适用随着数据的变化明天不一定是最好的。
Outline的主要使用在以下情况:
1.为避免在升级后某些sql出现严重性能下降而且在短时间内不能优化的情况,
我们可以使用outline的功能将原生产库中的sql执行计划实施在新的数据库上。
2.为避免SQL的执行计划在统计数据不准确的情况(如未能及时收集表或索引的统计信息)下导致变化从而引起的性能降低。
3.避免大规模分布实施的应用出现数据库版本、配置等区别引起的优化器产生不同的执行计划。
4.某些Bug引起优化器生成较差的执行计划。在bug修复前我们可以使用outline来强制SQL的执行计划的正确。
Outline的机制是将所需要的执行计划的hint保存在outline的表中。当执行SQL时,Oracle会与outline中的SQL比较,如果该SQL有保存的outline,则通过保存的hint生成执行计划。
Outlines can be generated for specific statements using the
CREATE OUTLINE
statement or the DBMS_OUTLN.CREATE_OUTLINE
procedure,uses the DBMS_OUTLN.CREATE_OUTLINE
procedure to create an outline查询
SELECT name, category, used FROM user_outlines;复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Oracle RAC ASM 磁盘组满了,无法扩容怎么在线处理?
Lucifer三思而后行
935次阅读
2025-03-17 11:33:53
Oracle DataGuard高可用性解决方案详解
孙莹
396次阅读
2025-03-26 23:27:33
墨天轮个人数说知识点合集
JiekeXu
338次阅读
2025-04-01 15:56:03
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
328次阅读
2025-04-08 09:12:48
Oracle SQL 执行计划分析与优化指南
Digital Observer
298次阅读
2025-04-01 11:08:44
风口浪尖!诚通证券扩容采购Oracle 793万...
Roger的数据库专栏
281次阅读
2025-03-24 09:42:53
切换Oracle归档路径后,不能正常删除原归档路径上的归档文件
dbaking
276次阅读
2025-03-19 14:41:51
Oracle 19c RAC更换IP实战,运维必看!
szrsu
269次阅读
2025-04-08 23:57:08
oracle定时任务常用攻略
virvle
266次阅读
2025-03-25 16:05:19
Oracle NetSuite 客户说|健合(H&H)集团部署 Oracle NetSuite,全面提升全球运营效率
甲骨文中国
254次阅读
2025-03-28 15:00:30
热门文章
移除DataGuard Standby配置导致Primary启动失败
2023-08-17 21265浏览
使用dblink产生的”SELECT /*+ FULL(P) +*/ * FROM XXXXX P ” 解析
2023-06-20 20885浏览
Troubleshooting 'ORA-28041: Authentication protocol internal error' change password 12c R2 DB
2020-04-08 13604浏览
浅谈ORACLE免费数据库Oracle Database XE (Express Edition) 版
2018-10-31 7536浏览
High wait event ‘row cache mutex’ in 12cR2、19c
2020-08-14 5540浏览