Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: v$_ vs v_$ ?

Re: v$_ vs v_$ ?

From: Fan Ruo Xin <fanruox_at_sbcglobal.net>
Date: Wed, 01 May 2002 20:04:31 GMT
Message-ID: <3CD04A72.68941360@sbcglobal.net>


Hi, Daniel,
I am not mean the difference between synonym and view. When I saw your first message, I misundertood it as v$_lock is the synonym for view v_$lock.
But I found:
SQL> select * from v$_lock;
LADDR KADDR SADDR RADDR LMODE REQUEST CTIME BLOCK -------- -------- -------- -------- ---------- ---------- ---------- ----------

02C86680 02C86690 02C24F90 02C86BE4          4          0          0          0
02C866BC 02C866CC 02C24F90 02C86B9C          4          0          0          0

SQL> select * from v_$lock;

ADDR KADDR SID TY ID1 ID2 LMODE REQUEST -------- -------- ---------- -- ---------- ---------- ---------- ----------

     CTIME BLOCK
---------- ----------

02C86824 02C86834          2 MR          7          0          4          0
         0          0
02C867AC 02C867BC          2 MR          1          0          4          0
The difference I mean is from these two output. I am sorry I didn't explain it clearly.
Best Regards,
Rosaline

Daniel Morgan wrote:

> Fan Ruo Xin wrote:
>
> > Good! Now I understand.
> > Thank you, Stan!
> > Rosaline
> >
> > Stan wrote:
> >
> > > I think your getting confused here. v$_lock is a synonym for
> > > sys.v_$_lock view and v$lock is a synonym for v_$lock view. Their source
> > > views are totally different and hence the difference.
> > >
> > > so as daniel said, v_$ -- > view of x$tables and v$_ -- > synonym.
> > >
> > > hth,
> > > -Stan
> > >
> > > Fan Ruo Xin wrote:
> > >
> > > >
> > > > Daniel Morgan wrote:
> > > >
> > > >
> > > >>Fan Ruo Xin wrote:
> > > >>
> > > >>
> > > >>>Hi,
> > > >>>What's the difference between v$_.. and v_$... ?
> > > >>>Thanks for any help!
> > > >>>Rosaline
> > > >>>
> > > >>One is a synonym and one is the actual object.
> > > >>
> > > >>v$_ = synonym
> > > >>v_$ = view
> > > >>
> > > >>
> > > >
> > > > Then why there is a little difference between v$_lock and v_$lock?
> > > > Thank you, Daniel!
> > > >
> > > >
> > > >>you could find this out by looking at object_type in all_objects.
> > > >>
> > > >>Daniel Morgan
> > > >>
> > > >
>
> One big difference is with respect to grants.
>
> You can grant select on v_$ but you can not grant select on a synonym.
>
> The synonyms are, as I understand it, present for backward compatibility. So
> if you are writing new code it is probably better to not use the synonyms and
> I would expect some minor but incremental improvement in resource utilization.
> Likely this is all connected to Oracle mythology originating with version 3 or
> something so I'll stay away from proclaiming this as a statement of fact.. ;-)
>
> Daniel Morgan
Received on Wed May 01 2002 - 15:04:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US