Re: How to test a query, that is slow only the first time it's executed

From: John Hurley <hurleyjohnb_at_yahoo.com>
Date: Thu, 18 Nov 2010 10:23:51 -0800 (PST)
Message-ID: <c9e1c2bc-83f4-4229-a084-6b79b9a6c852_at_j5g2000vbg.googlegroups.com>



Maikku:

> Hi,
> I found many posts about this problem, but didn't find a simple
> answer.
>
> I use 10.2 database. I have couple of complex queries/database
> procedures that are very slow when I run them first time a day. Second
> run is fast. When I try to optimize the queries I want to get the
> slowest run and I've tried ALTER SYSTEM FLUSH SHARED POOL and ALTER
> SYSTEM FLUSH BUFFER_CACHE but they don't seem to help. Is there a
> simple way to do this (cannot restart the database or make tablespace
> offline) ?
>
> Regards,
> Maija-Leena

Trace it the first time using a 10046 trace and put it thru a resource profiler.

Try reading Optimizing Oracle Performance by Cary Millsap. Received on Thu Nov 18 2010 - 12:23:51 CST

Original text of this message