v$sql vs v$sqlarea difference ??

  • From: "bao jiejie" <baojiejie@xxxxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 19 Dec 2008 10:56:06 +0800

Hi experts,

Today , my colleague ask me what is the difference between v$sql and
v$sqlarea, which made me blue...

I get some hints from *http://www.adp-gmbh.ch/* <http://www.adp-gmbh.ch/>
it says that

v$sql * v$sql is similar to
v$sqlarea<http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html#sqlarea>,
the main difference being that v$sql drills down to select * from
x$kglob<http://www.adp-gmbh.ch/ora/misc/x.html#kglob>whereas v$sqlarea
drills down to select sum from x$kglob. See also
here <http://www.adp-gmbh.ch/ora/admin/dynamic_views/diff_sql_sql_area.html>
.*

x$kglob *Library Cache Object


*

*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*


*
*But i am still not clear, someone told me v$sql may contains objects not
exists in Shared pool, which i am also not clear,

Can any one give me a clear answer ?*
*



Thanks a lot.





-- 

("'-''-/").___..--''"'-._
 '7_ 7  )   '_.  (     ).'-.__.')
 (_Y_.)   ._   )  '._ '. ''-..-'
_.'--'_..-_/  /--'_.' ,'
(il),-''  (li),'  ((!.-'

Best regards,
Yours sincerely House
baojiejie@xxxxxxxxx

Other related posts: