RE: sql question

  • From: "Igor Neyman" <ineyman@xxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 2 Apr 2004 09:15:23 -0500

Rob, 
You are right of course.

Igor Neyman, OCP DBA
ineyman@xxxxxxxxxxxxxx



-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of R Zijlstra
Sent: Friday, April 02, 2004 1:32 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: RE: sql question

Igor, 
I think it should be:

select SUBSTR(hint,  INSTR(hint,' ') + 1, LENGTH(hint) - INSTR(hint,' ')
-
1),
       count(*)
  from dba_outline_hints
 where hint like '%INDEX%'
GROUP BY (SUBSTR(hint,  INSTR(hint,' ') + 1, LENGTH(hint) - INSTR(hint,'
')
- 1));

--List of indices not used:
Select index_name 
  from user_indexes 
 where index_name not in ( 
    Select distinct SUBSTR(hint,  INSTR(hint,' ') + 1, LENGTH(hint) -
INSTR(hint,' ') - 1)
      from dba_outline_hints
     where hint like '%INDEX%'
         )

(INSTR changed)

Rob
--------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: