Oracle 视图 DBA_OUTLINE_HINTS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_OUTLINE_HINTS提供了有关当前轮廓的详细信息,可以帮助用户学习如何使用外部轮廓。外部轮廓使Oracle数据库在解释执行SQL语句时提供提示,以改善执行时间。它们还可以用于避免因查询重写失败而导致出现更慢的执行计划。

可以使用DBA_OUTLINE_HINTS视图来生成Hint文件,然后将其标记为可用,以便在外部轮廓组SQL语句执行时使用。要生成外部轮廓,您必须使用CREATE_OUTLINE_FILE存储过程,该存储过程使用DBA_OUTLINE_HINTS视图的结果作为输入。下面是使用DBA_OUTLINE_HINTS视图的一个示例:

EXECUTE DBMS_OUTLINE_MANAGER.CREATE_OUTLINE_FILE(
outline_name => ’emp_create_outline’,
source_cursor => ‘select * from emp where job = ”CLERK”;’,
source_desc => DBMS_UTILITY.MAKE_DESCR(23),
outline_hints => DBMS_OUTLINE_MANAGER.DBA_OUTLINE_HINTS);

官方英文解释

DBA_OUTLINE_HINTS describes the set of hints stored in all outlines in the database.

Related View

USER_OUTLINE_HINTS describes the set of hints stored in the outlines owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

NAME

VARCHAR2(128)

Name of the outline

OWNER

VARCHAR2(128)

Name of the user who created the outline

NODE

NUMBER

ID of the query or subquery to which the hint applies. The top-level query is labeled 1. Subqueries are assigned sequentially numbered labels, starting with 2.

STAGE

NUMBER

Outline hints can be applied at three different stages during the compilation process. This column indicates the stage at which this hint was applied.

JOIN_POS

NUMBER

Position of the table in the join order. The value is 0 for all hints except access method hints, which identify a table to which the hint and the join position apply.

HINT

CLOB

Text of the hint

See Also:

“USER_OUTLINE_HINTS”


数据运维技术 » Oracle 视图 DBA_OUTLINE_HINTS 官方解释,作用,如何使用详细说明