Oracle 视图 V$MAPPED_SQL 官方解释,作用,如何使用详细说明
本站中文解释
V$MAPPED_SQL视图是一个只读的数据视图,其中包含数据库中已经映射的SQL语句。该视图是以系统全局区(SGA)中的“缓存映射SQL”表为基础而建立的,包含有关所有加载到Oracle数据库的SQL语句的信息。
Oracle使用V$MAPPED_SQL视图可以查询和监测那些已缓存,正在被执行或具有最高可用性的SQL语句,而这些语句可能用于检索,更新和插入数据。特别的,可以检查在任何指定时间,任何SQL语句是否被加载到SGA中,并且确定是否可以根据语句内容完成缓冲等待时间。
要使用该视图,可用于查询V$MAPPED_SQL视图,并列出所有已缓存的SQL语句信息。例如:
SELECT * FROM V$MAPPED_SQL;
这将列出所有已缓存的SQL语句,包括SQL标识符,它们映射到的引用地址,SQL语句,SQL文本和其他信息,例如执行次数、平均执行时间等。
官方英文解释
V$MAPPED_SQL
lists the SQL statements that are translated and mapped in memory to a different SQL statement for execution.
Column | Datatype | Description |
---|---|---|
|
|
First 1000 characters of the original SQL text |
|
|
Full text for the original SQL statement |
|
|
SQL identifier of the original SQL statement |
|
|
Hash value of the original SQL statement |
|
|
First 1000 characters of the mapped SQL text |
|
|
Full text for the mapped SQL statement |
|
|
SQL identifier of the mapped SQL statement |
|
|
Hash value of the mapped SQL statement |
|
|
A non-NULL value specifies the object ID of the SQL translation profile used to translate the SQL statement into the mapped SQL statement |
|
|
The ID of the container to which the data pertains. Possible values include:
|
|
|
Time this SQL statement was translated |
|
|
CPU time used to translate this SQL statement |
|
|
Elapsed time used to translate this SQL statement |
|
|
Method used to translate this SQL statement |
|
|
SQL ID of SQL text in custom translation dictionary used to translate this SQL statement |
|
|
Number of times this translation has been used |