First page Back Continue Last page Graphics
Query V$SQL
Query V$SQL to look into the shared pool
Notes:
V$SQL is a window to the current contents of the shared pool. It “contains one row for each child of the original SQL text entered.” Refer to the Oracle9i Database Reference manual for a complete description of all columns.
The example above shows that Oracle treated the 7 executions of the query as the same SQL statement – without re-optimizing (i.e. hard parsing) the statement each time. (If the query was hard parsed again, it would show up as a separate row in V$SQL.)
V$SQL contains these columns:
SQL_TEXT: The 1st 1000 characters of the SQL statement. (V$SQL_TEXT contains the entire query.)
EXECUTIONS: Total number of times this statement has been executed
See the supplied script v$sql.sql for a working demonstration of this example.