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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to tune this query ...

RE: How to tune this query ...

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Fri, 08 Nov 2002 14:58:53 -0800
Message-ID: <F001.004FF6FA.20021108145853@fatcity.com>


This works nice .... Barbara Baker also hinted me that a good old RULE hint fixes the problem.  

Thank you Waleed and Barbara ...
Raj


Rajendra Jamadagni MIS, ESPN Inc.

Rajendra dot Jamadagni at ESPN dot com

Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!

-----Original Message-----
Sent: Friday, November 08, 2002 5:20 PM
To: Multiple recipients of list ORACLE-L

Try this:
SELECT l.SID,s.serial#,s.username,s.terminal,

        DECODE(l.TYPE,'RW','RW - Row Wait Enqueue', 'TM','TM - DML Enqueue', 'TX','TX - Trans Enqueue', 'UL','UL - User',l.TYPE||'System') res,  

        SUBSTR(t.NAME,1,20) TAB,u.NAME owner, 
        l.id1,l.id2, 
        DECODE(l.lmode,1,'No Lock', 
                2,'Row Share', 
                3,'Row Exclusive', 
                4,'Share', 
                5,'Shr Row Excl', 
                6,'Exclusive',NULL) lmode, 
        DECODE(l.request,1,'No Lock', 
                2,'Row Share', 
                3,'Row Excl', 
                4,'Share', 
                5,'Shr Row Excl', 
                6,'Exclusive',NULL) request 
FROM (select /*+ no_merge */ * from v$lock) l, (select /*+ no_merge */ * from v$session )s,
sys.USER$ u,sys.obj$ t
WHERE l.SID = s.SID
AND s.TYPE != 'BACKGROUND' 
AND t.obj# = l.id1 
AND u.USER# = t.owner# 
 
 

Waleed


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni_at_espn.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Received on Fri Nov 08 2002 - 16:58:53 CST

Original text of this message

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