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: Christopher Spence <cspence_at_FuelSpot.com>
Date: Thu, 30 Aug 2001 10:51:13 -0700
Message-ID: <F001.0037DADB.20010830105900@fatcity.com>

Take a
look at using array fetches to retrieve rows more efficeintly.  It appears you are fetching 1 row at a time.  Which can be grossly inefficient.
<FONT face=Arial color=#0000ff
size=2>Another helpful thing would to generate the TKPROF with Explan plans so you can see the rows per step and the paths chosen. <FONT face=Arial color=#0000ff
size=2> 
Also,
consider of bulk transaction use for the updates, which seem to be touching alot of blocks.
 
 
"Do not criticize someone until you walked a mile in their shoes, that way when you criticize them, you are a mile a way and have their shoes."
Christopher R. Spence <FONT

face="Comic Sans MS" size=2>Oracle DBA <FONT face="Comic Sans MS" 
size=2>Phone: (978) 322-5744 <FONT face="Comic Sans MS" 
size=2>Fax:    (707) 885-2275 

Fuelspot <FONT
face="Comic Sans MS" size=2>73 Princeton Street <FONT 
face="Comic Sans MS" size=2>North, Chelmsford 01863 <FONT 
face="Comic Sans MS" size=2>  

  

  <FONT
  face=Tahoma size=2>-----Original Message-----From: Robertson Lee -   lerobe [mailto:lerobe_at_acxiom.co.uk] Sent: Thursday, August 30, 2001   11:56 AMTo: Multiple recipients of list ORACLE-LSubject:   Tkprof output
  Apologies for the
  length of the mail.
 

  This query is
  running for a mad amount of time, anyone any ideas.   <SPAN
  class=078354714-30082001> 
  Code and tkprof
  out put shown below.
  <SPAN
  class=078354714-30082001> 
  Huge
  TIA
  <SPAN
  class=078354714-30082001> 
  Lee (who must
  learn more about such things !!!)
  <SPAN
  class=078354714-30082001> 
  DECLARE CURSOR
  TEMP_CDS ISSELECT
  ACXIOM_CUSTOMER_KEY,      
  VERSION_NO,      
  ADDRESS_OCCUPANCY_KEYFROM  
  CUSTOMER_DETAIL_SOURCEWHERE  VISIBLE=1;
 

  COUNTER
  NUMBER(8);
 

  <SPAN
  class=078354714-30082001>BEGIN   COUNTER:=0;   FOR   I IN TEMP_CDS   LOOP
 

  <SPAN
  class=078354714-30082001>     UPDATE
  &SCHEMA..SINGLE_CUSTOMER
  SC            SET
  VISIBLE =
  1            WHERE
  ACXIOM_CUSTOMER_KEY=I.ACXIOM_CUSTOMER_KEY              AND   VERSION_NO        
  =I.VERSION_NO;
 

  <SPAN
  class=078354714-30082001>     UPDATE
  &SCHEMA..SINGLE_CUSTOMER_HISTORY
  SCH            SET
  VISIBLE =
  1            WHERE
  ACXIOM_CUSTOMER_KEY=I.ACXIOM_CUSTOMER_KEY              AND   VERSION_NO        
  =I.VERSION_NO;
 

  <SPAN
  class=078354714-30082001>     UPDATE
  &SCHEMA..ADDRESS_OCCUPANCY
  AO            SET
  VISIBLE =
  1            WHERE
  ADDRESS_OCCUPANCY_KEY = I.ADDRESS_OCCUPANCY_KEY;
 

  <SPAN
  class=078354714-30082001>      COUNTER := COUNTER +

  1;      IF (COUNTER = 
  50000)      
  THEN          

  COUNTER:=0;         
  COMMIT;      END IF;   END
  LOOP;   COMMIT;
  <SPAN
  class=078354714-30082001> 
  Sort options:
  prsela  exeela  fchela 
  ********************************************************************************count    
Received on Thu Aug 30 2001 - 12:51:13 CDT

Original text of this message

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