Oracle 视图 ALL_STATEMENTS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图ALL_STATEMENTS是DBA_STATEMENTS的子集,它继承了父视图的所有特性。它以简要的方式显示当前用户已经运行的所有非结构化SQL语句,以及此用户所有的数据库操作,包括游标,流量,DDL语句和优化器等信息。
ALL_STATEMENTS可以帮助DBA在系统上监控用户访问最近运行的查询以及所有结构化查询语句,从而帮助DBA更好地理解服务器负载,找出性能瓶颈,优化数据库性能,以及指定起始和结束时间等信息。
使用ALL_STATEMENTS,可以通过以下语句来访问它:
SELECT * FROM ALL_STATEMENTS;
官方英文解释
ALL_STATEMENTS describes all SQL statements in stored PL/SQL objects accessible to the user.
Related Views
DBA_STATEMENTSdescribes SQL statements in stored PL/SQL objects accessible toSYS.USER_STATEMENTSdescribes SQL statements in stored PL/SQL objects accessible to the user. This view does not display theOWNERcolumn.
| Column | Datatype | NULL | Description |
|---|---|---|---|
|
|
| Owner of the statement |
|
| Signature of the statement. Every statement type has a unique PL/Scope signature that identifies that instance of th statement. | |
|
| Type of the statement. Statement types correspond to statements that can be used in PL/SQL to execute or otherwise interact with SQL:
| |
|
|
| Name of the object where the statement usage occurred |
|
| Type of the object where the statement usage occurred | |
|
| Unique key for a statement usage within the object | |
|
| Line number of the statement usage | |
|
| Column number of the statement usage | |
|
| Context USAGE_ID of an statement usage | |
|
| SQL ID of the SQL statement. The value of this column is null for statements that do not have a SQL ID. | |
|
|
If a hint appears inside of a subquery, then | |
|
| Indicates whether the statement contains a | |
|
| Indicates whether the statement contains a | |
|
| Indicates whether the statement returns results into a PL/SQL record ( | |
|
| Indicates whether the statement contains a | |
|
| Indicates whether the statement contains a | |
|
| Indicates whether the statement contains an | |
|
| The normalized form of the statement, when the statement has a normalized form. These are typically the same statements that have a SQL ID. The column value is null when the statement does not have a normalized form. | |
|
| Clob text of the SQL statement | |
|
| The ID of the container where the data originates. Possible values include:
|
See Also:
“DBA_STATEMENTS”
“USER_STATEMENTS”
