一起学习网 一起学习网


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

网络编程 Oracle 视图 ALL_REWRITE_EQUIVALENCES 官方解释,作用,如何使用详细说明 10-15

本站中文解释

ALL_REWRITE_EQUIVALENCES视图主要用于收集存储在数据库中的等价规则,Oracle 数据库中的等价规则用于将不同的 SQL 语句重写为等效的 SQL 语句,这有助于 Oracle 数据库改善 SQL 语句的可读性、减少 SQL 语句在执行时产生的计算量、提高 SQL 语句的执行效率。

使用ALL_REWRITE_EQUIVALENCES视图查看等价规则,需要首先连接数据库,然后执行如下查询:

SELECT Eq.Owner, Eq.Equivalent, Rw.Search_String
FROM All_Rewrite_Equivalences Eq
join All_Rewrite_Rules Rw
on (Eq.Owner = Rw.Owner
and Eq.Rewrite_Equivalence_Name = Rw.Rewrite_Equivalence_Name)
ORDER BY Eq.Owner, Eq.Equivalent;

该语句主要用于查询等价规则的所有者、等价规则的等价SQL语句及匹配该等价规则的搜索字符串。

官方英文解释

ALL_REWRITE_EQUIVALENCES describes the rewrite equivalences accessible to the current user.

Related Views

  • DBA_REWRITE_EQUIVALENCES describes all rewrite equivalences in the database.

  • USER_REWRITE_EQUIVALENCES describes the rewrite equivalences owned by the current user.

ColumnDatatypeNULLDescription

OWNER

VARCHAR2(128)

NOT NULL

Owner of the rewrite equivalence

NAME

VARCHAR2(128)

NOT NULL

Name of the rewrite equivalence

SOURCE_STMT

CLOB

Source statement of the rewrite equivalence

DESTINATION_STMT

CLOB

Destination of the rewrite equivalence

REWRITE_MODE

VARCHAR2(10)

Rewrite mode of the rewrite equivalence:

  • DISABLED

  • TEXT_MATCH

  • GENERAL

  • RECURSIVE

See Also:

  • “DBA_REWRITE_EQUIVALENCES”

  • “USER_REWRITE_EQUIVALENCES”


编辑:一起学习网

标签:语句,规则,视图,主要用于,数据库中