Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Tkprof output

RE: Tkprof output

From: Paul Baumgartel <pbaumgartel_at_mortgagesight.com>
Date: Thu, 30 Aug 2001 10:26:47 -0700
Message-ID: <F001.0037D8B6.20010830103052@fatcity.com>

Also note the
very high "query" number (i.e. buffers gotten for consistent read).  That could account for a lot of the i/o, which is the proximate cause of the loooong elapsed time.  From the (to use one of Lisa's favorite terms) doco (for 9i):
Read
Consistency
Your system might spend excessive time rolling back changes to blocks in order to maintain a consistent view. Consider the following scenarios:

  If there are
  many small transactions and an active long-running query is running in the   background on the same table where the changes are happening, then the query   might need to roll back those changes often, in order to obtain a   read-consistent image of the table. Compare the following   V$SYSSTAT statistics to determine whether this is happening:         

    consistent
    changes statistic indicates the number of times a database block has     rollback entries applied to perform a consistent read on the block.     Workloads that produce a great deal of consistent changes can consume a     great deal of resources.     

    consistent
    gets statistic counts the number of logical reads in consistent mode.     

  If there are few
  very, large rollback segments, then your system could be spending a lot of   time rolling back the transaction table during delayed block cleanout in order   to find out exactly which SCN a transaction was committed. The ratio of the   following V$SYSSTAT statistics should be close to 1:   ratio = transaction tables consistent reads undo records applied /

        transaction tables consistent read rollbacks

  A solution is to create more, smaller   rollback segments, or to use automatic undo management.

 
Paul Baumgartel MortgageSight Holdings, LLC pbaumgartel_at_mortgagesight.com

  <FONT face=Tahoma
  size=2>-----Original Message-----From: Koivu, Lisa   [mailto:lisa.koivu_at_efairfield.com]Sent: Thursday, August 30, 2001   12:47 PMTo: Multiple recipients of list ORACLE-LSubject:   RE: Tkprof output
  Lee,
  This query seems suspect
  UPDATE VM_LIVE.SINGLE_CUSTOMER_HISTORY SCH SET   VISIBLE=1WHERE ACXIOM_CUSTOMER_KEY = :b1  AND VERSION_NO =   :b2
  because of this   

    call     
    count       cpu    
    elapsed       
    disk      query    
    current        rows------- 

------  -------- ---------- ---------- ---------- ---------- 
----------Parse       
    0      0.00       
    0.00          
    0          
    0          
    0           
    0Execute  39562      
    4.55       7.22      
    10897     
    118687          

    1          
    1Fetch        
    0      0.00       
    0.00          
    0          
    0          

    0           0-------
------  -------- ---------- ---------- ---------- ---------- 
----------total    39562     
    4.55       7.22      
    10897     
    118687          
    1           1 
    

  It's reading a ton of blocks to operate on ONE   record.  What's the table structure here?  What's the index   structure?  Cardinality? 
  The buffer gets in the other queries are suspect   too.  What's your blocksize?  It's reading a ton of blocks to arrive   at the result.   

-----Original Message----- <FONT

    face=Arial size=1>From:   <FONT face=Arial 
    size=1>Robertson Lee - lerobe [SMTP:lerobe_at_acxiom.co.uk] <FONT 
    face=Arial size=1>Sent:   <FONT face=Arial 
    size=1>Thursday, August 30, 2001 11:56 AM <FONT face=Arial 
    size=1>To:     <FONT face=Arial 
    size=1>Multiple recipients of list ORACLE-L <FONT face=Arial 
    size=1>Subject:        <FONT 
    face=Arial size=1>Tkprof output 

    Apologies for the length of the mail.       This query is
    running for a mad amount of time, anyone any ideas. <FONT     face=Arial>  Code and tkprof out put     shown below.   <FONT face=Arial
    size=2>Huge TIA   <FONT
    face=Arial size=2>Lee (who must learn more about such things !!!)       DECLARE
    CURSOR TEMP_CDS ISSELECT
    ACXIOM_CUSTOMER_KEY,      
    VERSION_NO,      
    ADDRESS_OCCUPANCY_KEYFROM  
    CUSTOMER_DETAIL_SOURCEWHERE  VISIBLE=1; <FONT     face=Arial>  COUNTER
    NUMBER(8);   <FONT face=Courier
    size=1>BEGIN   COUNTER:=0;   FOR I IN     TEMP_CDS   LOOP  
         UPDATE
    &SCHEMA..SINGLE_CUSTOMER
    SC            SET
    VISIBLE =
    1           
    WHERE
    ACXIOM_CUSTOMER_KEY=I.ACXIOM_CUSTOMER_KEY                AND   VERSION_NO        
    =I.VERSION_NO;   <FONT
    face=Courier size=1>     UPDATE
    &SCHEMA..SINGLE_CUSTOMER_HISTORY
    SCH           
    SET VISIBLE =
    1           
    WHERE
    ACXIOM_CUSTOMER_KEY=I.ACXIOM_CUSTOMER_KEY                AND   VERSION_NO        
    =I.VERSION_NO;   <FONT
    face=Courier size=1>     UPDATE
    &SCHEMA..ADDRESS_OCCUPANCY
    AO            SET
    VISIBLE =
    1           
    WHERE ADDRESS_OCCUPANCY_KEY = I.ADDRESS_OCCUPANCY_KEY; <FONT     face=Arial>  <FONT face=Courier
    size=1>      COUNTER := COUNTER +
    1;      IF (COUNTER = 
    50000)      
    THEN          

    COUNTER:=0;         
    COMMIT;      END IF;   END
    LOOP;   COMMIT; 
    Sort options: prsela  exeela 
    fchela ********************************************************************************count    
Received on Thu Aug 30 2001 - 12:26:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US