Re: sql question

  • From: Stephane Faroult <sfaroult@xxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 02 Apr 2004 20:23:49 +0200

But are we going to let this kind of detail get in our way ?

I believe that

select index_name, count(*)
from (select rtrim(substr(ol.hint,
                          instr(ol.hint, ' ', 1, x.rn),
                          decode(instr(ol.hint, ' ', 1, x.rn + 1),
                                  0, 256,
                                     instr(ol.hint, ' ', 1, x.rn + 1)
                                       - instr(ol.hint, ' ', 1, x.rn))), ')')
                                       index_name
      from (select rownum rn
            from v$system_event) x,
            dba_outline_hints ol
      where instr(ol.hint, ' ', 1, x.rn) > 1
        and (ol.hint like 'INDEX%'
             or ol.hint like 'AND\_EQUAL%' escape '\'))
group by index_name
/

should do the trick.

SF



Jonathan Lewis wrote:
> 
> But what about hints like:
>     AND_EQUAL(T1 I1 I2)
>     INDEX_COMBINE(T1 BI1 BI2 BI3)
> 
> Regards
> 
> Jonathan Lewis
> http://www.jlcomp.demon.co.uk
>
----------------------------------------------------------------
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: