Or set a cron to check periodically the sql area. With something like this:

set serverout on
set termout off
spool $SPOOLNAME
declare 
-- exclude statements with v$sqlarea.parsing_schema_id = 0 (SYS) 
cursor c1 is select     address, sql_text, DISK_READS, EXECUTIONS, 
        PARSE_CALLS 
        from v$sqlarea where    command_type in (2,3,6,7) 
                                and parsing_schema_id != 0; 
cursor c2 is select addr, sql_text from sqltemp; 
        addr2 varchar(16); 
sqltext v$sqlarea.sql_text%type; 
dreads v$sqlarea.disk_reads%type; 
execs v$sqlarea.executions%type; 
pcalls v$sqlarea.parse_calls%type; 
begin 
        open c1; 
        fetch c1 into addr2,sqltext,dreads,execs,pcalls; 
        while (c1%found) loop 
                insert into sqltemp
values(addr2,sqltext,dreads,execs,pcalls); 
                commit; 
                fetch c1 into addr2,sqltext,dreads,execs,pcalls; 
        end loop; 
        close c1; 
        open c2; 
        fetch c2 into addr2, sqltext; 
        while (c2%found) loop 
                do_explain(addr2,sqltext); 
                fetch c2 into addr2, sqltext; 
        end loop; 
        close c2; 
        dbms_output.put_line('Ejecutado sin inconvenientes');
exception when others then
                dbms_output.put_line('ERROR: '||sqlerrm(sqlcode));
end; 
/
spool off



> -----Mensaje original-----
> De:   Vadim Gorbounov [SMTP:[EMAIL PROTECTED]]
> Enviado el:   lunes 5 de febrero de 2001 16:31
> Para: Multiple recipients of list ORACLE-L
> Asunto:       RE: Index Usage Monitoring
> 
>       Hi, 
>       Why not to use otrace? Of cource, you may need some space to save
> trace results, but you'll definitely get complete statistics.
> 
>       Vadim Gorbounov
>       Oracle DBA
> 
> -----Original Message-----
> Sent: Tuesday, January 30, 2001 3:57 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> We have a purchased application with over 1,300 indexes.
> 
> Can someone suggest a method to monitor the system to
> determine which indexes are actively being used over time?  I'm assuming
> that some are old/not necessary and would like to save the overhead
> of maintaining them.
> 
> Oracle 8.0.6
> 
> 
>  Patrick Prince                               email: [EMAIL PROTECTED] 
>  Omaha Public Power District               voice: (402) 636-3762 
>  444 S 16th St. Mall, Omaha, NE 68102    fax: (402) 636-3931  
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: PRINCE, PATRICK W.
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (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).
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Vadim Gorbounov
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Trassens, Christian
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (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).

Reply via email to