Re: SQL performance in prod

From: Vishnu <vishnukumarmp_at_gmail.com>
Date: Wed, 18 Jul 2018 18:49:20 -0400
Message-ID: <CABkZzkcMBoRd9i1CC2e11ZfDADmArUf6wym8LkX9Ojx4-=0acA_at_mail.gmail.com>



Hi Venky,

There can be many reasons.Below are few questions I would ask myself for troubslehooting.

Are you able to replicate ? Good vs plan depends on the data it is querying ?

Are you using bind variables in your query? Using bind variables vs hard coded makes any difference? Is it selecting data from partitions?What’s your oracle version? Are you using 12c adaptive features that’s making this change in behavior ?

For fixing, one option is to get good plan hash value and fix using baseline.

Thanks,
Vishnu

On Wed, Jul 18, 2018 at 6:30 PM V Raman <vraman4list_at_gmail.com> wrote:

> List
>
> We have a SQL that is performing intermittently bad in our prod env. The
> good ones take 2 to 5 mins, the bad ones run for hours we kill them. They
> run fine in the non prod env. I ran an awsqrpt and based on that I see that
> there are a few executions with the bad ones taking hours. Looking at the
> differences in the execution plan, the good ones have lots of nested loops
> in them, with the bad ones having lots of hash joins.
>
> I am trying to figure out the cause(s). Assuming there is not much change
> in the DB, the first thing that comes to mind is statistics. Can the
> listers help with ideas? Thanks.
>
> If anyone is interested is seeing the report, i can provide a link to them
> by email.
>
> Venky
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jul 19 2018 - 00:49:20 CEST

Original text of this message