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: sql question

RE: sql question

From: R Zijlstra <rmsah_at_xs4all.nl>
Date: Fri, 2 Apr 2004 08:31:52 +0200
Message-Id: <200404020631.i326VDk2066890@smtp-out5.xs4all.nl>


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_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Fri Apr 02 2004 - 00:27:44 CST

Original text of this message

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