Re: Select statement runs slow until flush of shared pool

From: Carlos Sierra <carlos.sierra.usa_at_gmail.com>
Date: Wed, 28 Nov 2012 06:30:19 -0500
Message-ID: <CAGzKQQeYUjZQ6nXGX=9Kq9DRJpFbC5QkG5+k7mBQqmo2La9OyQ_at_mail.gmail.com>



Clarification here. The main SQL cannot change its execution plan while it is execution. That is given. But this SQL executes recursively two functions that contain some SQL statement. Those SQL statements get executed many times and they can be invalidated and re-parsed while the parent SQL is still in execution.

On Tue, Nov 27, 2012 at 4:25 PM, Radoulov, Dimitre <cichomitiko_at_gmail.com>wrote:

> On 27/11/2012 20:48, Jorgensen, Finn wrote:
> > [...]
> > I've had a couple of people suggest maybe the statement was running with
> a bad plan and thus it was slow. However, the slow running statements are
> fixed more or less immediately by a flush of the shared pool. What I'm
> trying to explain is that "currently running" SQL is fixed by the flush.
> The execution plan doesn't change once the statement is running. That's why
> I went down the path of latches etc.
>
> As I already said, we had a very similar issue, flushing the shared pool
> seemed to affect the plan immediately.
> I don't know if the plan of the SQL invoked by the function is
> guaranteed to remain the same during execution.
>
>
> Regards
> Dimitre
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Cheers -- Carlos Sierra
http://carlos-sierra.net/


--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 28 2012 - 12:30:19 CET

Original text of this message