Oracle 视图 DBA_WI_STATEMENTS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_WI_STATEMENTS列出了由所有编译的增强逻辑计划驱动的所有SQL语句。它包括超级用户,系统管理员和正常用户创建和执行的所有可编译SQL语句。它提供有关每个SQL语句的详细信息,例如:SQL文本,驱动表,绑定变量和参数,优化模式,二进制SQLID,控制注释等。
使用方法:
可以使用SELECT语句与DBA_WI_STATEMENTS视图结合,查询这张表里的某些字段(如sql_text,control_factory_name)的数据,以获得相关信息:
SELECT sql_text,control_factory_name
FROM dba_wi_statements;
官方英文解释
Each row in DBA_WI_STATEMENTS
describes a statement (SQL or PL/SQL) that is part of the template with identifier TEMPLATE_ID
, which has been found in the workload that is related to the Workload Intelligence job whose identifier is equal to JOB_ID
.
A template may consist of multiple statements, for example, if it represents a transaction. In this case, there is one row in this view for every one of these statements. These statements are ordered, based on the order defined by the corresponding transaction. Column SEQUENCE_NUMBER
is used to describe this order.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
The identifier of the job in the workload of which the given statement has been found |
|
|
|
The identifier of the template in the given job to which the current statement belongs |
|
|
|
A number that indicates the order of the current statement in the given template |
|
|
|
The SQL text associated with the current statement. Note that although multiple SQL statements can be classified to the same template, only one row is stored that represents them all. This row corresponds to the first instance of the given template that is found during parsing of the workload. |