René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

The difference between v$sql and v$sql_area

Using the comp_table_structure.sql script, I can compare the structure of v$sql and v$sqlarea:
SQL> connect / as sysdba
SQL> @comp_table_structure
Table 1: v_$sql
Table 2: v_$sqlarea
The table v_$sql and v_$sqlarea have columns with the same name but differ:
------------------------------------------------------------------------

OUTLINE_SID                    NUMBER                        22
OUTLINE_SID                    VARCHAR2                      40

LAST_LOAD_TIME                 VARCHAR2                      19
LAST_LOAD_TIME                 DATE                           7


columns in v_$sql but not in v_$sqlarea
------------------------------------

CHILD_ADDRESS
CHILD_NUMBER
SERVICE
SERVICE_HASH
SQLTYPE
TYPE_CHK_HEAP

6 rows selected.

columns in v_$sqlarea but not in v_$sql
------------------------------------

LAST_ACTIVE_CHILD_ADDRESS
VERSION_COUNT