DB version: 11.2.0.4
OS : RHEL 6.7
I would like to know the difference between V$SQLAREA and V$SQL. Below is what 11.2 doc says
V$SQLAREA lists statistics on shared SQL area and contains one row per SQL string
V$SQL lists statistics on shared SQL area without the GROUP BY clause and contains one row for each child of the original SQL text entered
For a particular SQL_ID , I have run the following 3 queries in a 3-node RAC DB. Both gv$sqlarea and gv$sql returned 3 rows.
So, I would like to know the difference between V$SQLAREA and V$SQL.
select * from gv$sqlarea where sql_id = 'awhmxunsm7xbx'
--returns 3 rows ( For instance 1,2 and 3)
select * from gv$sql where sql_id = 'awhmxunsm7xbx'
--returns 3 rows ( For instance 1,2 and 3)
--- Below query returned 35 rows. Output snipped for readability
select inst_id, sid, serial# from gv$session where sql_id = 'awhmxunsm7xbx'
order by inst_id;
INST_ID SID SERIAL#
---------- ---------- ----------
1 6855 26937
1 4483 13493
1 4477 7165
1 4189 21071
1 4005 32821
.
.
.
3 6285 6893
3 6664 10779
3 2676 2983
35 rows selected.