DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Tkprof

  1. #1
    Join Date
    Feb 2001
    Posts
    119

    Tkprof

    Pls give your suggestions ..


    Code:
    select s.job_key 
      from jobs s 
     where s.JOB_key = :V001 
    
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse    6666      1.01       0.99          0         41          0           0
    Execute  6666      9.85      10.22          0          0          0           0
    Fetch    6666      0.81       0.87          4      33332          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total    19998     11.68      12.09         4      33373          0           0
    
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer goal: CHOOSE
    Parsing user id: 26  
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
          0  INDEX UNIQUE SCAN JOBS_KEY_IND (cr=2 r=2 w=0 time=3667 us)(object id 23179)
    
    
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                   49994        0.00          1.30
      SQL*Net message from client                 49994        0.12        133.67
      db file sequential read                         4        0.00          0.00
      latch free                                      7        0.00          0.00
    Last edited by gandolf989; 08-07-2007 at 03:32 PM.

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    My opinion is that you should always format column data, Its hard for someone else to know why 'SQL*Net message %% client' waits are so high, and a unique scan for a single row should be quick but any number of other things could cause the query to take longer to return.

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    parse once - execute many

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    use bulk processing

  5. #5
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    My suggestion is that this statement works fine.
    Maybe you could be so kind to tell us what exactly your concerns are, so that we do not have to presume that.
    Presuming that you are shocked by the number of parses, to be the same as the number of executions, I would suggest to read metalink Note:32895.1
    https://metalink.oracle.com/metalink...,0,1,helvetica
    which says:
    " 6. Both the soft and hard parse register as a parse in tkprof. Hashing the
    current statement updates the parse count.

    7. Soft parse avoids many of the steps taken during the parse phase for a
    particular statement. Initial syntactic and semantic checks are made and
    then the statement is hashed and compared with hashed statements in
    the SQL area. If a match is found, then existing information is used
    and relatively expensive steps (such as query optimization etc.) are avoided."

    So as long as your parse CPU takes less than 10% of the total CPU and the elapsed parse time is less than 10% of the total elapsed time and you have only one library cache miss (what means one hard parse) you can be happy about that

    See the note for more details about soft parse and hard parse

  6. #6
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    Do you have any problem. If yes mention that.
    However as it's already suggested the only thing you need to check is why the parse and execution count same.
    http://www.perf-engg.com
    A performance engineering forum

  7. #7
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    I think I explained that. See above

  8. #8
    Join Date
    Oct 2005
    Location
    Indianapolis
    Posts
    100
    What I find interesting here is it's one of those "does this exist" queries - it never actually returns any rows...
    "False data can act only as a distraction. Therefore. I shall refuse to perceive you." - Bomb #20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width