Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle 9i: Information about how frequent materialized views have been used
Query the V$SQLAREA. The execution count will tell you how often SQL
against these views is executed.
SELECT SUM(EXECUTIONS) FROM V$SQLAREA WHERE SQL_TEXT LIKE '%<OBJECT>%';
You could extend this with an anonymous block driven off of all_objects or user_objects
DECLARE
CURSOR c_cursor IS SELECT OBEJCT_NAME FROM USER_OBJECTS WHERE OBJECT_TYPE=VIEW;l_count PLS_INTEGER;
This will be ****SLOW**** so run it off hours.
Good Luck!
-- ~~~~~~~~~~~~~~~~ Chris Weiss www.hpdbe.com High Performance Database Engineering ~~~~~~~~~~~~~~~~ "Stefan Dipper" <stefan.dipper_at_sap.com> wrote in message news:3C4ED367.960EC055_at_sap.com...Received on Wed Jan 23 2002 - 12:40:22 CST
> Hi all,
>
> is there a possibility to figure out in Oracle 9i on a view level how
> frequent materialized views have been used ? Information of that kind is
> quite important for a DBA to be able to decide whether the effort to
> maintain the materialized view makes sense. I would like to avoid a
> situation where there are hundreds of materialized views in a system and
> nobody knows which are the important ones.
>
> Regards,
> Stefan
>
>
>
>