Received: (qmail 3211 invoked from network); 9 Sep 2012 17:18:29 -0500
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by static-ip-85-25-126-90.inaddr.ip-pool.com with SMTP; 9 Sep 2012 17:18:24 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C5C55EE7B67;
 Sun,  9 Sep 2012 18:18:23 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1347229103; bh=2pkxyHkZprDLIJBfssy862PU1xFHcOfAAEo4kGC5
 XmY=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:
	 Subject:To:Cc:Content-type:Content-Transfer-Encoding:Sender:
	 Reply-To:List-help:List-unsubscribe:List-Id:List-subscribe:
	 List-owner:List-post:List-archive; b=wAHfRsmYQ8SeBOo0gqCV0bJo1f1i2
 dEr6Jc/kuBW99cnILVW2lJW+MIIfDEUc8iKe06yR/GUTdWZqArXBrjYpmC8DYixoPVF
 7K6b5Obgk6QvYoneMUXk6gPLo4GwE6jh2LxBiWQKP6jLeIv3lOTZpboG4x2BBfQFw3f
 FQkgRD0s=
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id XIlfZaAWT5TM; Sun,  9 Sep 2012 18:18:23 -0400 (EDT)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A1143EE7A84;
 Sun,  9 Sep 2012 18:17:40 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Sun, 09 Sep 2012 18:16:59 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id F0A68EE78CA
 for <oracle-l@freelists.org>; Sun,  9 Sep 2012 18:16:58 -0400 (EDT)
Authentication-Results: turing.freelists.org; dkim=pass (2048-bit key) header.i=@gmail.com
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id bRh4bImd2V3T for <oracle-l@freelists.org>;
 Sun,  9 Sep 2012 18:16:58 -0400 (EDT)
Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6997AEE78A7
 for <oracle-l@freelists.org>; Sun,  9 Sep 2012 18:16:57 -0400 (EDT)
Received: by pbbro8 with SMTP id ro8so1311886pbb.10
        for <oracle-l@freelists.org>; Sun, 09 Sep 2012 15:16:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type;
        bh=FW10P4zdSY9y48VcI/FtEeWcruQOgMdL/fv1CPgKMkc=;
        b=J9afw8VEqUf9JeEtZJQmC6/2nqVACqAQNwMtcmnxES70YApiFWWgP0OuBm9lf22ym7
         wZiaN5TgHk2SAzwSQD0+GRMc2QTL+JiE2WdtiodxvNjmo5nMQskx5UAhZRHaSY4rwkdn
         DA89LC4YZo3ILKNJicWScYbM8LRh8+r+ehlhRc2T/VmaamXiGISs+BgPNfDHe1NjqnzB
         LP6p05ws6ZS5czxIx7Nnbe7/YT4ro1Gxrjm5PcTJuzqkkgeFBIuyl1laamfmRDhVDXSr
         gFtBBynVz6q7TQ1/MKsgADa6GOOo9STjqMm8FaOaWLNsBIIF0V/ib3Gf5R29YZYiQkWd
         NBPg==
Received: by 10.68.228.132 with SMTP id si4mr2289053pbc.57.1347229017328; Sun,
 09 Sep 2012 15:16:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.68.216.8 with HTTP; Sun, 9 Sep 2012 15:16:37 -0700 (PDT)
In-Reply-To: <CAFsgGrx5eiXqG-nC6D_6F5Y0-cAeF+mx4oBeEaB5qXzc+ppCKQ@mail.gmail.com>
References: <CAFsgGrx1CBidGx+KFBPYvhvyqmVGif7vEA8o7sQ3-4kvaPtDYg@mail.gmail.com>
 <CADsdiQjA-Lggrj4LxSYkmyvAo49ii35O+wpwQHMpKQgXBmbK9w@mail.gmail.com> <CAFsgGrx5eiXqG-nC6D_6F5Y0-cAeF+mx4oBeEaB5qXzc+ppCKQ@mail.gmail.com>
From: Karl Arao <karlarao@gmail.com>
Date: Sun, 9 Sep 2012 17:16:37 -0500
Message-ID: <CACNsJndE3n6nv3NZjWm-FC4rOHfXLfkRxO3KrxCoZkVJR0rhjw@mail.gmail.com>
Subject: Re: Performance tuning of a system
To: s.cislaghi@gmail.com
Cc: kyle Hailey <kylelf@gmail.com>, Oracle L <oracle-l@freelists.org>
Content-type: text/plain
Content-Transfer-Encoding: 8bit
X-archive-position: 44719
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: karlarao@gmail.com
Precedence: normal
Reply-To: karlarao@gmail.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l

"So we know that almost 99% are under 2 sec but sometimes others are
above 5sec, 20/30sec. "
Kerry Osborne has this script called whats_changed.sql that could be
applicable to that requirement
http://blog.enkitec.com/enkitec_scripts/whats_changed.sql that SQL
queries DBA_HIST_SQLSTAT
which may not contain all of your SQLs but I think would be good enough
number of samples for what you are trying to achieve.

So let's say you want to have all SQLs that has gone slower for the last 99
days with a minimum elapsed time of 5seconds and at least went twice as
slow.. you'll get the output below.

16:54:28 SYS@dw> @whats_changed
Enter Days ago: 99
Enter value for min_stddev: 2
Enter value for min_etime: 5
Enter value for faster_slower: S%

SQL_ID               EXECS AVG_ETIME_BEFORE AVG_ETIME_AFTER   NORM_STDDEV
RESULT
------------- ------------ ---------------- --------------- -------------
------
5bbwwqft5h36b            2             0.59            8.79        9.8024
Slower
d15cdr0zt3vtp        7,277             0.35            5.58       10.6024
Slower

Then you can investigate if the SQL is having a lot of plan changes by
using the script awr_plan_change.sql
http://blog.enkitec.com/enkitec_scripts/awr_plan_change.sql or you can
drill on specific time frame where the SQLs has gone >5secs by querying ASH
or generating ASH report on those particular periods also Enterprise
Manager is pretty handy if you want to see what's happening (in terms of
workload,CPU,IO) during those periods.




-- 
Karl Arao
karlarao.wordpress.com
karlarao.tiddlyspot.com
twitter.com/karlarao


--
http://www.freelists.org/webpage/oracle-l


