Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Frequent Queries
Steve Howard wrote:
> ExecMan wrote:
> > Hi,
> >
> > Is there a way to somehow record what the most frequent running queries
> > are in your database? We want to know what our most frequently used
> > queries are............
> >
> > Thank you.
>
> Hi,
>
> desc v$sql
>
> Depending on your version of Oracle and your license, look into
> DBA_HIST_SQLSTAT (if on 10.x), or whatever the corresponding table name
> is in STASPACK if you are on less than 10.x.
>
> HTH,
>
> Steve
If you do not have the Performance Pack license required to access the AWR views legally or you are on a release below 10g you can create a process where you sample the v$sql views to find the most executed SQL statments on a regular basis and keep a record of the SQL and execution counts.
HTH -- Mark D Powell -- Received on Fri Jan 19 2007 - 17:50:31 CST