How to explain gaps in V$ ACTIVE_SESSION_HISTORY?

I'm being responsible for explaining why a feature of an internal web application takes 10 to 30 seconds in our production environment (version 10.2.0.5).  With the help of the user knows the slow (slow has seen his side, in the web application), I managed to determine the SQL_ID of the feature in question: 2xpjrny0dwsyh.

I then query V$ ACTIVE_SESSION_HISTORY to draw what the user's session has been up to during oblivion 20 second the question (of 16 H 43:15 to 16 H 43:35).  My only criteria are SID = 9999 and sample_time BETWEEN 16: 00 and 16:44. Here are out ordered by SAMPLE_TIME:

Order SQL_ID TIME EVENT wait_time

08 June 2015 16:42:58 f20wj97jbn67h SELECT 2

08 June 2015 16:43:11 9pjvj5vnh4tnq SELECT 820

08 June 2015 16:43:32 2xpjrny0dwsyh SELECT 58

08 June 2015 16:43:38 06f3pchfk9f6h SELECT 61

08 June 2015 16:43:42 798mrd4hy8yu7 SELECT 9

08 June 2015 16:43:46 28b1p89gmcnf5 SELECT 63

08 June 2015 16:43:49 28b1p89gmcnf5 SELECT 10

I have several questions about this release:

  1. V$ ACTIVE_SESSION_HISTORY active sessions samples every second. I understand that my session 9999 was active 3 seconds only (43: 32, 43:38, 43:42)?
  2. The 'EVENT' column has no data (returned with null): does this mean that my session 9999 known none of odds founded in this period?
  3. My SELECT 2xpjrny0dwsyh appears only once: am I understanding it lasted < = 1 second?
  4. What really happened between 43: 32 and 43:38 for example?  My session is inactive?

ASH is a sample, a sample of active sessions every second.

It doesn't tell you what happened between every second.

It said you that what was happening on this sample.

It's enough to diagnose many problems / interpret many situations, but not all.

It is not a replacement of 100% for a complete SQL Trace.

In addition to the sql id, you need sql_exec_id and sql_exec_start to recognize a single execution of the sql statement.

> am I so understand that my session 9999 was active 3 seconds only (43: 32, 43:38, 43:42)?

No, only that in samples of every second, it was only active for 3 of them.

To put this in any context you must look at the TM_DELTA_ * columns that are not always 100% reliable.

You know is that you were not actively waiting or are actively working in the database all the time.

> The 'EVENT' column has no data (returned with null): does this mean that my session 9999 known none of odds founded in this period?

If SESSION_STATE is in WAITING then EVENT tells you what you expect at this sample.

If you have no CASE, this would imply that your SESSION_STATE is ON CPU - i.e. not actively queued on the EVENT, but are actively working.

> my SELECT 2xpjrny0dwsyh appears only once: am I understanding it lasted<= 1="">

No.ASH does not tell you much about the time cumulative SQL.

Unlikely, but it may be that he has worked for all / most of the time apart from the specific sampling time.

What you know definitely, is that this slowness is not 100% down for this request otherwise, expect a more sustained presence in the samples.

V$ SQL and DBA_HIST_SQL_STAT can tell you a little more on cumulative/aggregates/averages for a defined period (requires research before & after if you use V$ SQL).

If you return a sql statement lines to a customer, then you will do a performance, some go looking for (which returns rows to the client and the number of rows per fetch depends on client configuration).

Depending on how your application is coded, you might loop, extract a few lines, because each line make a little logic or possibly another search, etc.

This time, extraction and application think time is not registrable in the comic book.

> what really happened between 43: 32 and 43:38 for example?  My session is inactive?

We cannot tell. No ASH. You can use the columns TM_DELTA * to see if you accumulated a significant amount (relatively) working during this period or if you did nothing or almost nothing.

For what you want to know, a level extended SQL Trace session might be more appropriate.

It will give the image full of what SQL session performed in what order, how many back and forth, exactly what you expected and exactly how expiration time of a defined period of time has been spent in the comic book.

Tags: Database

Similar Questions

  • How to explain the error in the executable file?

    As everyone knows, there are 3 parts to the cluster of error: status and source code. The State's flag, the code is the error code and the source is where Labview think that the error occurred. Normally, when I'm in the environment labview course I can just right mouse click the error and click "explain the error" and a description and detailed error possible cause rises.

    However, when I create an executable I don't know how to explain the error to the user, such as labview.

    When an error occurs that I wish I had a popup that says code error, source and EXPLANATION. The code and the only source is so enigmatic sound quite panic inducing the user, whether or not the error is unrecoverable/crash-inducing. Also this would save me having to search the online error code.

    How to make the explanation of the error code? There is a vi that I can enter an error code and get the explanation string?

    There is probably something simple I forget but I couldn't find the answer in my research. Thanks in advance for your help.

    Simple error handler and screw General Error Handler?

  • How to eliminate gaps between songs when burning a cd in Windows media player?

    How to eliminate gaps between songs when burning a cd in Windows media player?

    I can't find it in tab options "burning."

    Windows Media Player does not support to burn CDs gapless.
    CD burning is a new feature that will be available for Windows Media Player in Windows 7.

  • I got Chrome a few years ago and I don't know how to explain it, but one day, he was gone. He changed Amazon search engine.

    I downloaded Google Chrome, but it ended up with a different search engine. I got Chrome a few years ago and I don't know how to explain it, but one day, he was gone. He changed Amazon search engine. I uninstalled Chrome and reinstalled, but I still had Amazon.

    Any ideas? I liked Chrome when I had for a short time and want it to be again.

    Well you have a better answer to the Google forums but go to settings > Search > default engine Exchange.

  • Windows 7 Media Player how close the gaps between tracks

    Hello world.

    Anyone has an idea how to eliminate gaps between songs on my playlists?  Give refresher courses in shape and want to have transparent music when teaching.  Thoughts?  Any information will be greatly appreciated.

    Lenovo IdeaPad Z570 Windows 7

    Hi xt

    There is a fade in wmp tool that might do the trick - (I've never used it myself you have to experiment!)

    Play any track and go to playback in progress pane in WMP (rather than component library) - right-click in any space and you will see "improvements". Go over it and you will see "Crossfading and volume control.
    Try it and see how you go... I would not play around with any other audio effects however; some of them can make things sound pretty dire!

    Finally - leave you a memo for you remember what changes you made and how you got there. It's so easy to forget (well that's when there are my age!)

    A soon R

  • How to explain the following code?

    How to explain the following code?
    1 set setOpenTradeIds = mapTrades.keySet (filter);
    2 map mapResults = null agent, map.invokeAll ((Filter));
    Is defined a class and setOPenTradeIds a new object?
    Is card calss and mapResults a new object?

    Thank you

    Published by: frank.qian on June 7, 2009 10:48

    Hi Frank,.

    Is mapTrades an object and a set of keys one of its methods?

    mapTrade is a reference variable refers to an instance of a class that implements the keySet() method that returns a reference to an instance of a class that implements the interface of game

    What is map.invokeAll? Where to get the information about it?

    map is a reference variable refers to an instance of a class that implements the invokeAll() method that returns a reference to an instance of a class that implements the map interface In case of card to make reference to an instance of a class that implements the InvocableMap interface, you can find consistency documentation 3.4.2 method to InvocableMap.

    Kind regards

    Harv

  • Numbers of PDF 1053-1067, but there are only 15 pages. How to explain this?

    Why page numbers is not order from 1-15? Also the page numbers on the actual PDF interface does not match the actual numbering on the scan. I don't think it's a bug. It may be more than one feature that I've never met before.

    Please explain. Thank you

    It depends on what created the pdf file and how it was created. Tell someone exported the pdf from InDesign file, it will use the page numbers that are used in the document. There could be a variety of reasons, that the page numbers in a document, InDesign (and other types of document) are not simply labelled 1-15.

  • what code is better-how reading explain plan

    10g. How to read explain plan
    explain plan for
    with av as
    (
    SELECT  last_name, salary, 
            department_id,
              round(avg(salary) over (partition by department_id) ) avg_sal
    FROM    employees
    )
    
    select * from av where salary > avg_sal
    order by last_name;
    
    select * from table(dbms_xplan.display)
     
    explain plan

    Plan hash value: 1582291400
     
    ----------------------------------------------------------------------------------
    | Id  | Operation            | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT     |           |   107 |  5671 |     5  (40)| 00:00:01 |
    |   1 |  SORT ORDER BY       |           |   107 |  5671 |     5  (40)| 00:00:01 |
    |*  2 |   VIEW               |           |   107 |  5671 |     4  (25)| 00:00:01 |
    |   3 |    WINDOW SORT       |           |   107 |  1605 |     4  (25)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL| EMPLOYEES |   107 |  1605 |     3   (0)| 00:00:01 |
    ----------------------------------------------------------------------------------
     
    Predicate Information (identified by operation id):
    ---------------------------------------------------
     
       2 - filter("SALARY">"AVG_SAL")
    explain plan for
    
    SELECT  a.last_name, a.salary, 
            a.department_id, b.salavg
    FROM    employees a, (SELECT   department_id, 
                          AVG(salary) salavg
                          FROM     employees
                          GROUP BY department_id) b
    WHERE   a.department_id = b.department_id
    AND     a.salary > b.salavg
    order by last_name
    
    select * from table(dbms_xplan.display)
    Plan hash value: 802276651
     
    ----------------------------------------------------------------------------------
    | Id  | Operation            | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT     |           |   165 |  5610 |     8  (25)| 00:00:01 |
    |*  1 |  FILTER              |           |       |       |            |          |
    |   2 |   SORT GROUP BY      |           |   165 |  5610 |     8  (25)| 00:00:01 |
    |*  3 |    HASH JOIN         |           |  3296 |   109K|     7  (15)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL| EMPLOYEES |   107 |  2889 |     3   (0)| 00:00:01 |
    |   5 |     TABLE ACCESS FULL| EMPLOYEES |   107 |   749 |     3   (0)| 00:00:01 |
    ----------------------------------------------------------------------------------
     
    Predicate Information (identified by operation id):
    ---------------------------------------------------
     
       1 - filter("A"."SALARY">SUM("SALARY")/COUNT("SALARY"))
       3 - access("A"."DEPARTMENT_ID"="DEPARTMENT_ID")

    Rahul India wrote:

    ----------------------------------------------------------------------------------
    | Id  | Operation            | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT     |           |   107 |  5671 |     5  (40)| 00:00:01 |
    |   1 |  SORT ORDER BY       |           |   107 |  5671 |     5  (40)| 00:00:01 |
    |*  2 |   VIEW               |           |   107 |  5671 |     4  (25)| 00:00:01 |
    |   3 |    WINDOW SORT       |           |   107 |  1605 |     4  (25)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL| EMPLOYEES |   107 |  1605 |     3   (0)| 00:00:01 |
    ----------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    2 - filter("SALARY">"AVG_SAL")
    

    ----------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 165. 5610 | 8 (25) | 00:00:01 |
    |* 1 | FILTER |
    | 2. GROUP SORT BY | 165. 5610 | 8 (25) | 00:00:01 |
    |* 3 | HASH JOIN | 3296. 109K | 7 (15) | 00:00:01 |
    | 4. TABLE ACCESS FULL | EMPLOYEES | 107. 2889 | 3 (0) | 00:00:01 |
    | 5. TABLE ACCESS FULL | EMPLOYEES | 107. 749. 3 (0) | 00:00:01 |
    ----------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------
    1 - filter("A".") SALARY "> SUM ("SALARY") COUNT ("SALARY"))"
    3 - access("A".") DEPARTMENT_ID "=" DEPARTMENT_ID")

    As a general rule, there is no way, you can decide which is the best plan without knowing what data happens in the request, and what will come out.
    You will notice, among other things, that Oracle has used a view complex merger to change your query with the aggragate inline view in a simple join with aggregation end (see http://jonathanlewis.wordpress.com/2007/03/08/transformation-and-optimisation/ for invasive how it may be). With a different dataset the optimizer might decide to regroup before joining - just the way you wrote the application.

    An essential difference between your two plans is (as others have pointed out) that one of them analyse the table twice, the other once - however, the other key difference is that the whole dataset COULD BE relevant to be sorted by the analytical application and resources used in the genre could well take on the resources used by a second analysis and integration of a single column.

    The difference is irrelevant in this case - but the difference exists and must be considered in the greatest examples.

    You could also write the query to use a subquery to correlated - which the optimizer may rewrite the same plan 'join then aggregate' one of your queries achieved - but once again as an intelligent agent, you can decide that (in some cases), the best plan is the subquery filter implied by the form of the SQL.

    Concerning
    Jonathan Lewis

  • THINGS ON THE 2 SIDES OF MY OFFICE, I THINK THAT I DON'T KNOW HOW TO EXPLAIN IT

    PLEASE HELP ME, IM NOT A COMPUTER GENIUS

    Hello

    Please do not type in capital letters as it is difficult to read and regarded as yelling.

    Please try to describe what you see if the methods below (all) do not help. The screen not extend fully
    edges?

    Bring back moved off screen Windows on your desktop (keyboard Trick)
    http://www.howtogeek.com/HOWTO/Windows/bring-misplaced-off-screen-Windows-back-to-your-desktop-keyboard-trick/

    If a separate monitor (not a laptop), it will be setting of physical geometry on it then you can move all the
    the screen to the right and enlarge if necessary. Also right click an empty area of the desktop - graphic properties.
    Search for geometry settings (PCs and laptops).

    If a laptop computer Right Click a white office - properties Graphics - look at the horizontal settings.

    If necessary contact your system support manufacturer and check their documents and online forums. Do the
    even with the monitor manufacturer if different from the manufacturer of the system.

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • How to fix gaps in the document

    Hello Dreamweavers.

    IM practicing in DW and I've encountered a problem, when I see that my Web page in live mode view there is a discrepancy, the top until the navigation bar starts.

    Here is the screenshot and my code:

    Thank you

    u2a.jpg

    #nav {}

    list-style-type: none;

    Width: 700px;

    margin-right: auto;

    left margin: auto;

    padding-top: 0px;

    padding-right: 0px;

    padding-bottom: 0px;

    padding-left: 0px;

    }

    #nav li {}

    background-color: rgb (0,0,255);

    text-align: center;

    display: block;

    float: left;

    Width: 15%;

    padding: 10px;

    do-family: Tahoma, Geneva, without serif.

    text-transform: capitalize;

    right margin: 5px;

    border: thin double rgb (255,0,0).

    }

    #article {width: 500px;}

    margin-right: auto;

    left margin: auto;

    top of the margin: 100px;

    height: 500px;

    }

    a: link {}

    color: rgb (255,255,255);

    }

    a: hover {}

    color: rgb (102,255,0);

    }

    < / style >

    < / head >

    < body >

    < ul id = "nav" >

    < li > < a href = "index.html" > home < /a > < /li >

    < li > < a href = "about.html" > on < /a > < /li >

    < li > < a href = "portfolio.html" > portfolio < /a > < /li > ""

    < li > < a href = "location.html" > location < /a > < /li > ""

    < li > < a href = "contact.html" > contact < /a > < /li >

    < /ul >

    < div id = "section" >

    location of < h1 > < / h1 >

    < p > < / p >

    < p > contrary to popular belief, Lorem Ipsum is not simply text at random. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years. Richard McClintock, a Professor of Latin at the Hampden - Sydney College in Virginia, one of the more obscure terms latins, computer, looked up a passage of Lorem Ipsum and passing by her quote of the word literature classic, discovered the undoubted source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of the 'of Finibus Bonorum and Malorum"(The extremes of good and evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet... '. ", comes from a line in section 1.10.32. < /p >

    < / div >

    < / body >

    < / html >

    Use clear: both; as below instead of margin-top: 100px; I have commented / * /.

    #article {}

    Width: 500px;

    margin-right: auto;

    left margin: auto;

    Clear: both;

    / * margin-top: 100px; */

    height: 500px;

    }

    Every time that you use the "float" attribute as you have for the

  • Tags that you need to 'clear' the floats so that the following in this case, that the 'article' container recover in html.

  • How to explain this... I want a list to bullets with bullets downwards in the middle. How?

    I want to do this:

    Something • something else

    Other things other things •

    Point 1 • things Extra

    But what I want is for the line up balls down in the middle. Is there a way to do this automatically in InDesign, or do I just space all to make it work?

    InDesign CS3

    Use a table with three columns. Put the balls in the middle column.

    Bob

  • If I click on Favorites to add a web site to a folder of bookmarks, it is up to "Edit bookmark" followed by "Delete bookmark" follow-up to my bookmarks Menu folders. How can I change change and remove so that I can add websites to my different folders?

    I don't know how to explain what I have already said.

    https://support.Mozilla.com/en-us/KB/how-do-i-use-bookmarks

    Or you can drag directly site location bar icon in the bookmarks bar.

  • How to replace the battery CMOS on TECRA M3?

    Could someone tell this newbie how to change the battery CMOS on a Tecra M3?
    I can see it is located under the hard drive that I can remove, but cannot see how to strip all along to get to the battery.

    Thank you very much

    nilocp

    The CMOS battery swap is not so simply, and to do this you need to disassemble the laptop everything.
    Can you do that as a beginner?
    It's maintenance manual isn't public document and how to explain the exact disassembly steps now.

    Have you tried to load the CMOS battery properly? Leave laptop on the power supply more than 48 hours and it must be fully charged again.

  • How can I get the icons on my small desk?

    I don't see all my desktop icon they are for adults I see only some of them. I don't know how to explain it. I don't see all my shortcuts on the screen display. I need help how to make my shortcut icon smaller on my screen of help please. Thank you.

    Hi GaetaneDupuis

    You can check this link to make your icons small

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-desktop/how-do-i-shrink-to-norm-large-desk-top-items/aa616303-D816-43ba-ba4d-fbe513419001

  • How can I add another user on my computer?

    If you have a user and you want to create another user of the computer (multi-user) how I start this process?

    Hello

    Certainly the password protect your user account if you create another user account.

    http://pcsupport.about.com/od/windowsvista/HT/nvistapassword.htm

    And here's how to create another user account

    http://Windows.Microsoft.com/en-us/Windows-Vista/create-a-user-account

    1. Open a user account by clicking on the button start , clicking Control Panel, clicking user accounts and family safety, and then clicking user accounts.
    2. Click on manage another account. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    3. Click on create a new account.

    4. Type the name you want to assign to the user account, click an account type, and then click on create an account.

    This the very good tutorial in how he explains with pictures:

    http://www.bleepingcomputer.com/tutorials/create-new-user-account-in-Windows-Vista-7/

    See you soon.

Maybe you are looking for

  • CCleaner

    I have a prob described here: https://support.Mozilla.org/en-us/questions/920581 The thread is closed, so I can't add to my question. I had this probe before too and I have uninstalled and reinstalled MF. The problem is resolved. Favorites to return

  • Configfree using bluetooth devices with external?

    I have a satellite M30 and I used a TDK Bluetooth PC Card. I love the software Configfree came with the laptop and noticed that it can detect the Bluetooth connections and wi - fi, but it works with pre-installed bluetooth devices. Is there anyway th

  • Bay: 50-55 adapter

    Hey all,. I finally got round to buying an SSD to put in this PC, a crucial MX200 500 GB The drive works perfectly, but I have a little problem with that need a good adapter/drive Bay media. I'm actually now in support Crucial clean but it attaches n

  • can I use ie10 on a machine running vista

    Compatible with Vista or IE9 Vista IE10 is compatible with the latest version? Bill

  • Why can't connect me my hotmail?

    whenever I try to log on to my hotmail, to check my emails that I get a 405 error message.