SQL Trace and TKprof

Hello,
Can someone tell me what is SQL trance and TKprof?
when we will apply and what need of this?
why i should give alter session set sql trace = true?
if someone could give me an idea of what is a TKprof do, would be apprecaited.

if someone could give me an idea of what is a TKprof doThe doc has an idea : http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF01010
Nicolas.

Similar Messages

  • Sql trace and tkprof result

    When I use sql trace and tkprof. After I use tkprof, I get the result statistics. However, I don't understand one point that I see many queries which I didn't run. I mean how come these queries executed? and by who?
    thanks

    some could be recursive sql statemets run by oracle. Post some example what you are running and what you are seeing?
    The SQL statements can be listed in a TKPROF report in the order of how much resource they used, if desired. Also, recursive SQL statements issued by the SYS user to manage the data dictionary can be included or excluded.
    How to Use and Understand the TKPROF utility

  • Analysing details of SQL trace and runtime analysis for a report.

    Hi,
    I am trying to tune the performance of a Z ABAP report for target group export. A brief overview of what is done in the report is the retrieval of BP details present in the Target group including BP general, address, marketing attributes, person responsible and contact person details. As the target groups can be quite huge (around 6000 BPs), the report gives performance issues. I want to understand on how to analyse the details which I obtained from the run time analysis and SQL trace and on how to take it forward.
    Any inputs in this regard would be helpful.
    Thanks in advance,
    Anushree

    In Runtime analysis Look for
    ABAP -  In your ABAP code
    DATABASE  -  It shows the performance of your SELECT statements in your program.
    Just check how much % it is showing for both.
    Check for following in your code.
    1) Avoid SELECT *
    2) Clear internal tables values which are not required at the ending of program, as it saves memory
    etc.

  • What is SQL Trace and How to Use it .

    Dear Experts .
    1.) May You Please tell me What is the Purpose of SQL-Trace and How to use it ?
    2.) What is purpose of T-codes SE30 and ST22 ?
    Please it is urgent ...
    Regards :  Rajneesh

    Hi
    SQL Trace transaction ST05: The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on a particular database table of the ABAP program would be mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Run time analysis transaction SE30 :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing. 
    STEPS
    Run time analysis transaction SE30
    In Transaction SE30, fill in the transaction name or the program name which needs to be analyzed for performance tuning.
    For our case, let this be “ZABAP_PERF_TUNING”
    After giving the required inputs to the program, execute it. After the final output list has been displayed, PRESS the “BACK” button.
    On the original SE30 screen, now click on “ANALYZE” button.
    The percentage across each of the areas ABAP/ Database/System shows the percentage of total time used for those areas and load on these areas while running the program . The lesser the database load faster the program runs.
    SQL Trace – ST05
    Starting the Trace:
    To analyze a trace file, do the following:
    Choose the menu path Test  Performance Trace in the ABAP Workbench or go to Transaction ST05. The initial screen of the test tool appears. In the lower part of the screen, the status of the Performance Trace is displayed. This provides you with information as to whether any of the Performance Traces are switched on and the users for which they are enabled. It also tells you which user has switched the trace on.
    Using the selection buttons provided, set which trace functions you wish to have switched on (SWL trace, enqueue trace, RFC trace, table buffer trace).
    If you want to switch on the trace under your user name, choose Trace on. If you want to pass on values for one or several filter criteria, choose Trace with Filter.
    Typical filter criteria are: the name of the user, transaction name, process name, and program name.
    Now run the program to be analyzed.
    Stopping the Trace:
    To deactivate the trace:
    Choose Test Performance Trace in the ABAP Workbench. The initial screen of the test tool appears. It contains a status line displaying the traces that are active, the users for whom they are active, and the user who activated them.
    Select the trace functions that you want to switch off.
    Choose Deactivate Trace. If you started the trace yourself, you can now switch it off immediately. If the performance trace was started by a different user, a confirmation prompt appears before deactivation-
    Analyzing a Sample trace data: PREPARE: Prepares the OPEN statement for use and determines the access method.
    OPEN: Opens the cursor and specifies the selection result by filling the selection fields with concrete values.
    FETCH: Moves the cursor through the dataset created by the OPEN operation. The array size displayed beside the fetch data means that the system can transfer a maximum package size of 392 records at one time into the buffered area.

  • Finding SQL trace and Log trace in SAP ME

    Dear Experts,
    I am new to SAP ME SDK 2.0  development. After depolying the ME with changes.If an error occurs as "An internal error occurred; contact technical support". Where should I check for the traces like SQL trace or og trace.
    Thanks in advance,
    Eswaraiah M.

    Hello,
    Log records are written to NW log and can be viewed in NW log viewer.
    Konstantin

  • Reg : SQL Trace and ECAT

    Hi Floks ,
    Any body knowing The SQL trace analysis and Ecat tool .send me how to work on this issues .Please send me with snap shot it's will help to who don't know how to utilize this tools.
    thanks,
    suresh

    Hi suresh,
    Check these links.
    SQL trace
    http://www.sapdevelopment.co.uk/perform/perform_sqltrace.htm
    Go to st05 and activate trace, go back and run your transaction or report again go to st05 deactivate trace and click display trace here you can find information with this you can performence analysis, database tables, fields etc.
    ECAT
    eCATT stands for extended Computer Aided Test Tool (eCATT) which is built is testing tool to test SAP system. By using testing tool we can test the entire business process, and we can also use this tool with a third party testing tool (I am not covering this topic). Execution of every test script ends with a log, which explains the results of the test script.
    By using eCATT we can do following operations,
    ·        Test transactions, reports, and scenarios
    ·        Call BAPIs and function modules
    ·        Test remote systems
    ·        Check authorizations (user profiles)
    ·        Test updates (database, applications, GUI)
    ·        Test the effect of changes to customizing settings
    ·        Check system messages
      For more information go to
    http://help.sap.com/saphelp_erp2004/helpdata/en/2a/121e3bd711bb04e10000000a114084/frameset.htm
    To develop a test script in eCATT we need to follow the following steps,
    1. Creating Test Scripts.
    2. Creating Test Data Containers[16] .
    3. Understanding System Data Containers[17] .
    4. Executing Test Configurations.
    There is a very good web blog on eCATT in sdn.com which explains eCATT with necessary screen shots.
    To read document click here Blog on eCATT
    http://www.sapdevelopment.co.uk/testing/ecatt.htm

  • SQL Trace and Bind Values

    I need to capture bind values in SQL Trace. I am running Oracle 9.2.0.8. I will be running my queries from an application, not SQL Plus. I can use a after log on trigger to turn on trace. Has anyone done this with success? Are there any other ways to do this at the server level?
    Thank you for your input
    David

    Hello David,
    it is such easy ... you wouldn't believe it.
    Have a look at the pl/sql procedure "dbms_system.set_ev", with this one you can do this on session level: http://www.oracleadvice.com/Tips/dbms_system.htm#SET_EV
    There are also some other possibilities... but this should hit your question..
    To turn on:
    SQL> exec dbms_system.set_ev(<SID>, <SERIAL>, 10046, 12, '');
    To turn off:
    SQL> exec dbms_system.set_sql_trace_in_session(<SID>, <SERIAL>, FALSE);
    Regards
    Stefan

  • SQL tracing and TKPROF tool, how to get object name

    Hi,
    I set sql_trace = ture for my session.
    Then I use TKPROF (on trace file) to get the explain plan (for my stored procedure). but the explain plan shows obj# (object number), HOW do I get TKPROF to show object name on explain plan (I have checked the SYBEX book, it has no info on that)?
    Also can you get explain plan from SQL (without sql_trace) for stored procs, if so HOW?
    Thanks

    SELECT
    SERVERPROPERTY('MachineName') AS [ServerName],
    SERVERPROPERTY('ServerName') AS [ServerInstanceName],
    SERVERPROPERTY('InstanceName') AS [Instance],
    SERVERPROPERTY('Edition') AS [Edition],
    SERVERPROPERTY('ProductVersion') AS [ProductVersion],
    Left(@@Version, Charindex('-', @@version) - 2) As VersionName
     |
    Blog: MSBICOE.com |
    MCITP - BI, SQL Developer & DBA
    Hate to mislead others, if I'm wrong slap me. Thanks!

  • Trace file and TKPROF

    Hi All,
    While tuning procedures generally I go through all queries, generate explain plans to check which is expensive and try yo tune that.Recently I got some procedures in top buffer gets list.when I gone through all queries. All using Indexes and cost is very low and accessing small tables.The number of iterations in the loop also not much.But it is taking 3 million bufffer gets for each execution.
    How can I find out which part of procedure is causing these many buffer gets? Currently I dont have acces to trace files and TKprof.If I get access How it is going to help me in tuning the above procedure.
    I need to explain effictively to DBA the use of trace and TKprof to get this access.

    TKPROF will give buffer gets usage by query. If the same query (with bind variables) is executed several times, you will get a summary for all executions of the same query. You can also switch on and off trace with ALTER SESSION statement to limit tracing and even do it from another session (see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:12005269305828706290::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:330817260752)
    For SQL trace and TKPROF usage, see
    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96533/sqltrace.htm#1018

  • SAP Tools vs. SQLTrace and TKPROF

    Experts,
    First let me say that I am NOT an oracle expert, I am a basis person.  Such is the reason I come seeking wisdom.
    We are undergoing somewhat of a knee-jerk performance analysis, based on some user complaints.  Our new-to-the-organization dba (who has no experience in SAP) is wanting to set up a small performance tablespace within our Production ECC DB and use sql trace and tkprof to analyze what ever it is that they are wanting to look at.
    In the past we have been slightly more methodical about tracking down the problem, and then analyzing it based on traces and information within the ST* and DB* tools of SAP.
    my 2 questions are:
    -  Is there any concern with setting up perf gathering tablespace within the production DB
    - Does SQLTrace and TKProf give information not readily available within SAPs performance and administration txn's? (DBACockpit, ST* tools, Etc.)
    (edit: environment is Solaris 10 64-bit/Oracle 10.2.0.2 64-bit  e2900 64/GB Mem)
    Thank you in advance,
    Phillip
    Edited by: Phil May on Oct 9, 2009 1:47 PM

    Hi Stefan,
    > At first i think, that the analyze possibilities inside SAP for performance issues are one of the best i have ever seen.
    True and sad at the same time.
    There would be so much more necessary to really have an end-to-end performance view of data processing processes in heterogeneous and distributed systems like SAP landscapes are.
    >So in my opinion you can mostly identify and track down the performance issues within SAP itself (ST05, ST04, STAD, etc.).
    > > Does SQLTrace and TKProf give information not readily available within SAPs performance and administration txn's?
    > Of course .. the raw SQL trace is much more detailed (wait events, etc.), but to be honest .. mostly you don't need it in a SAP environment.
    Hmm... I think this (being able to solve most problems with the currently available tool set) only partly comes from the completeness of the tool set.
    At least for a part of it, I think it's something like 'When-all-you-have-got-i-a-hammer-everything-look-like-a-nail"-effect.
    Usually the "Wait Event Evangelists" (like Cary Milsap) will tell you that the extended SQL trace is all you'll ever need to track down all of your performance issues.
    Then there is a whole group of people that try to catch everything by staring at execution plans and theorizing about what execution step would be the problem cause (e.g. the bad hash join or the bad bad bad full table scan).
    The DB-agnostic counterpart will say that the NetWeaver platform already covers everything necessary and that look out for additional indexes or ABAP parameters.
    I think the truth lies (as usual) somewhere in between.
    All in all I think the key point is to get an angle to the problems at all.
    As soon as one can describe the problems in a structured way, (s)he has at least a chance to figure out what is happening when
    the systems becomes slow.
    Given that I'd also vote for the most convenient approach - and that is to use the GUI tools provided by NetWeaver.
    And the more experienced Oracle tuning-super-heroes can always take a step further and emply the sql_id-data-collection script or one of the endless number of special scripts that are available through report RSORASTT nowadays.
    Just my 2 pence...
    regards,
    Lars
    Edited by: Lars Breddemann on Oct 10, 2009 10:31 AM

  • Sql trace - tkprof

    Hi..
    My requirement is to
    run a sql trace, with binds, replicate the issue in the SQL Report Wizard and then upload both the raw trace and tkprof'd output.
    Can anyone give me in detail explanation for the above?
    Rgds
    Geeta Mutyaboyina

    You might find [url http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]this link useful.
    Regards,
    Rob.

  • CLIENT 에서 SQL TRACE 뜨기

    제품 : ORACLE SERVER
    작성날짜 : 2002-05-07
    PURPOSE
    Client에서 SQL trace를 뜨는 방법
    EXPLANATION
    오라클을 사용하는 tool 에서 sql trace 를 사용하고자 하면
    alter session set sql_trace=true ; 를 사용한다.
    또는 dbms_session.set_sql_trace (true) 사용한다.
    이는 forms 를 비롯하여 precompiler 를 포함한다.
    또 이의 반대는
    alter session set sql_trace= false ; 를 사용한다.
    또는 dbms_session.set_sql_trace (false) 사용한다.
    이 때 실행된 결과는 user_dump_dest 에 쌓이는데 , file 이름은 process 번호를
    참고한다.
    그러나 MTS 의 경우 trace file 의 구분이 모호해지므로 client를 connect 시
    dedicate 로 붙여 trace 를 사용하여야 하며, 만일 다른 session 에서 다른
    session의 것을 trace 뜨고 싶으면,
    dbms_system.set_sql_trace_in_session 을 사용할 수 있다.
    EXAMPLE
    이의 사용법은 다음과 같다.
    1. Setup
    catproc.sql 에서 생성되는 package 와는 달리 dbms_system 의
    public synonym 은 생성되지 않고 권한도 부여되지 않는다.
    DB 생성 초기에 SYS user 만 reference 할 수 있으므로 이 package 를
    사용할 user에게 권한을 부여한다.
    예제 : GRANT EXECUTE ON DBMS_SYSTEM to username;
    2. v$session 으로부터 SID 와 serial 번호를 부여한다.
    SQL> select sid, serial#, osuser, username
    2> from v$session;
    SID SERIAL# OSUSER USERNAME
    7 66 <osLogin> <oracleUserName>
    3. 원하는 session 에서 SQL trace 를 setting 한다.
    exec sys.dbms_system.set_sql_trace_in_session
    (12,16631,TRUE);
    또는 pl/sql procedure 에서:
    begin
    sys.dbms_session.set_sql_trace ((<sid>,<serial>,TRUE);
    end
    4. session 에서 SQL Trace 를 끝마친다. 이 결과는 user_dump_dest에
    쌓인다.
    exec sys.dbms_system.set_sql_trace_in_session
    (<sid>,<serial>,FALSE);
    또는 pl/sql procedure 에서
    begin
    sys.dbms_session.set_sql_trace (<sid>,<serial>,FALSE);
    end
    만일 os user 가 khpark 인 client 에서 실행하는 sql 의 trace 를 뜨고
    싶으면
    svrmgrl> select sid,serial#,osuser from v$session
    where osuser='KHPARK';
    sid serial# osuser
    =================================================
    8 12 khpark
    svrmgr>execute dbms_system.set_sql_trace_in_session (8,12,TRUE);
    이렇게 하면 udump 에 trace file 이 생기므로 이를 이용하여 tkprof 를 수행한다.
    REFERENCE DOCUMENT
    ---------------------

    Hello Carl,
    SQL Trace and SQL Profiler are deprecated since SQL Server 2012 which means that at any future version it might not be available anymore. Have you considered using Extended Events - Microsoft.SqlServer.Management.XEvent
    Namespace?
    Ivan Donev MCT and MCSE Data Platform
    I've spent a fair bit of time reading about XEvents - eventually I won't need SQL 2008 support anymore and I can stop using Trace - but I'm not seeing anything remotely close to TraceServer.  What I see is an elaborate infrastructure for efficiently
    collecting information about high volume OLTP workloads with minimal server impact.  That's all well and good, but of no use to me at all.  What I'm looking for is real-time information about OLAP database processing that I can embed in my app to
    provide detailed metrics on same.  
    Presumably something can be put together using XEvents as the source and ETW as the target, with real-time monitoring of ETW events, but that's a lot of API to get a handle on, and I haven't seen any helpful samples that show putting it all together to get
    a profiler-like experience with live viewing of processing events as they happen.
    Any pointers to helpful samples/resources on XEvents are appreciated - long term, that's going to be my path, I'm sure.
    -cd Mark the best replies as answers!

  • No insert Statements for EKKO EKPO in ST05 sql trace for transaction me21n

    No insert Statements for EKKO EKPO in ST05 sql trace for transaction me21n.
    IN ST05 I set a filter for ME21N and executed transaction to create a Purchase Order and then checked
    ST05 but there is  NO insert for EKKO or EKPO??
    How Do I find in which columns of EKKO and EKPO data is inserted in ST05?
    Edited by: DeepakNandikanti on Apr 28, 2010 8:27 AM

    Hi,
    I tried in my system and I can see INSERT statement on EKKO and EKPO tables. What exactly you are looking for? Some one else might have switched on the trace at the same time. Can you try again and see.
    ST05=>Switch on trace
    ME21N=>Create PO.
    ST05=>Switch off and display trace.
    In trace list search for EKKO and EKPO.
    Column names are not shown in the trace list. It is the SQL trace and column list is generated dynamically like :A0, :A1....
    @ Suhas,
    That might be because the tables are updated via BAPIs ... Do you think SAP uses direct update statements on the DB tables ??
    I didn't get above statement. Is there any other way of updation that happens when using BAPI? I believe that, even in case of BAPI there will be update task FMs called during database update. Please correct if i got it wrong.
    Thanks,
    Vinod.

  • Plz help me to understand sql trace

    Hi,
    i need your help to understand the sql trace and where exactly i should concentrate,
    i am also going through docs,
    your help is appreciated,
    select count(rep)
    from
    (select /*+ leading(v1 v2) use_nl_with_index(v2) */ count(v1.val) rep from
      (select rn, val from (select rownum rn, val from (select /*+ no_merge
      no_parallel(t) no_parallel_index(t) dbms_stats cursor_sharing_exact
      use_weak_name_resl dynamic_sampling(0) no_monitoring */"FFPR_FFAMS_ID" val
      from sys.ora_temp_1_ds_108308 t where "FFPR_FFAMS_ID" is not null group by
      "FFPR_FFAMS_ID" having count("FFPR_FFAMS_ID") = 1)) where ora_hash(rn) <=
      273538662) v1, (select /*+ index(t2) */ "FFPR_FFAMS_ID" val from
      "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t2) v2 where v2.val = v1.val
      group by v1.val having count(v1.val) <= 2)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.29          0       8131          0           1
    total        3      0.00       0.30          0       8131          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_FFAMS_FK_I") dbms_stats
      cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
      no_expand index(t,"FFPR_FFAMS_FK_I") */ count(*) as nrw,count(distinct
      sys_op_lbid(692895,'L',t.rowid)) as nlb,count(distinct "FFPR_FFAMS_ID") as
      ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where ("FFPR_FFAMS_ID" is not
      null) and (TBL$OR$IDX$PART$NUM("DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS",
      0,4,0,"ROWID") = :objn)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       2.56          0        425          0           1
    total        3      0.00       2.56          0        425          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_FFAMS_FK_I") dbms_stats
      cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
      no_expand index(t,"FFPR_FFAMS_FK_I") */ count(*) as nrw,count(distinct
      sys_op_lbid(692895,'L',t.rowid)) as nlb,count(distinct "FFPR_FFAMS_ID") as
      ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where "FFPR_FFAMS_ID" is not
      null
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       2.56          0        427          0           1
    total        3      0.00       2.56          0        427          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_PK_I") dbms_stats cursor_sharing_exact
      use_weak_name_resl dynamic_sampling(0) no_monitoring no_expand index(t,
      "FFPR_PK_I") */ count(*) as nrw,count(distinct sys_op_lbid(692907,'L',
      t.rowid)) as nlb,null as ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as
      clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where ("FFPR_ID" is not null
      or "FFPR_PLAN_NAME" is not null) and
      (TBL$OR$IDX$PART$NUM("DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS",0,4,0,
      "ROWID") = :objn)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       1.51        847        857          0           1
    total        3      0.00       1.52        847        857          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_PK_I") dbms_stats cursor_sharing_exact
      use_weak_name_resl dynamic_sampling(0) no_monitoring no_expand index(t,
      "FFPR_PK_I") */ count(*) as nrw,count(distinct sys_op_lbid(692907,'L',
      t.rowid)) as nlb,null as ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as
      clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where "FFPR_ID" is not null
      or "FFPR_PLAN_NAME" is not null
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       1.26          0        850          0           1
    total        3      0.00       1.27          0        850          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       13      0.00       0.03          0          0          0           0
    Execute     13      0.00       1.32         43        242         29           9
    Fetch        4      0.00       0.00          0          0          0           4
    total       30      0.00       1.36         43        242         29          13
    Misses in library cache during parse: 4
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse     2945      0.00       1.04          0          0          0           0
    Execute   3741      0.00       5.49       3137      12995       7050      203362
    Fetch     3088      0.00      38.42       3344      39486         27        9811
    total     9774      0.00      44.96       6481      52481       7077      213173
    Misses in library cache during parse: 284
    Misses in library cache during execute: 160
      144  user  SQL statements in session.
    2814  internal SQL statements in session.
    2958  SQL statements in session.Regards
    nic

    Hi,
    i did the homework, but some how i dont seem to understand what oracle is doing behind
    esp with hints like
    select /*+ leading(v1 v2) use_nl_with_index(v2) */ count(v1.val)
    /*+ no_parallel(t) no_parallel_index(t) dbms_stats
      cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
    substrb(dump(min("XXX"),16,0,32),1,120),
      substrb(dump(max("XXX"),16,0,32),1,120),i havent used this things any where in my program, but still they are used,
    so i got confused, can you throw some light on this issue,
    regards
    nic

  • Code inspector, SQL trace

    Hi all,
    Can anyone help me to analyse the output of sql trace and  code inspector that we do for a program.
    Thanks & regards,
    Saroja.

    SQL trace(ST05) provides the developer with the ability to analyse database select statements. Simply execute ST05 to turn on SQL trace, then execute the statement/program you want to analyse. Now turn off SQL trace using ST05
    and click on list trace to view the details.
    If you notice performance issue, you can perform an SQL trace :
    1 - ST05
    2 - Activate trace
    3 - Run your prog.
    4 - Deactivate trace & display it !
    You'll see accessed tables, with runtime, etc...
    You can also perform traces on other items such as authorisation objects.
    Authorisation trace analysis 1. Open two sessions
    2. Execute transaction ST01 in one of the sessions
    3. Select the authorisation checkbox, note the other traces
    you can perform (SQL, RFC, Table Buffer etc)
    4. Click the 'Trace On' button
    5. Within your other session execte the transaction/report
    you want to trace or get the user in question to do it
    6. Return to the session where you turned the trace on and
    click on 'Trace Off' otherwise it will continue to record
    all athorisation checks
    7. Click on the 'Analysis' button
    8. Enter appropriate data into selection screen such as
    Username, type of trace records (i.e. Authorization check)
    9. Click on the Execute button.
    10. Report displaying trace results will now be displayed
    http://www.sapdevelopment.co.uk/perform/perform_sqltrace.htm
    Code inspector is a static check on your code. This check highlights statements that MAY cause long run times or inconsistant results.
    This is new as of 6.10, it can be installed on 4.6C or 4.6D systems.
    Code inspector includes the checks from the earlier 'Extended program check', (also transaction SLIN). The transation code for 'Code inspector' is SCII.
    Regards,
    Amey
    Message was edited by:
            Amey Potale

Maybe you are looking for