Analysis of a trace - tkprof
Hello, I would like to locate the root of a very slow execution of a package at the base. For this to make a trace session on the last run it took 77 minutes to complete.
Then he saw the information on after turning it with tkprof. In the first part are the most expensive operations, and ultimately the overall results.
Database Version: 10.2.0.4.0
Standard Edition - RAC - ASM
total RAM 16G
sga_target 1504M
db_cache_size 0
owner XAJTDB
--Package/procedure executed (from a job)
BEGIN HISR_FUTURE.p_hisr_future_all; END;--file xa212_j000_14811348.trc
TKPROF: Release 10.2.0.4.0 - Production on Fri Feb 1 15:23:26 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: xa212_j000_14811348.trc
Sort options: fchela
*SELECT MAX(UTCTIME)*
*FROM*
*CONECT_01 WHERE POINTNUMBER=:device_1*
call count cpu elapsed disk query current rows
Parse 1776 0.05 0.03 0 0 0 0
Execute 1776 0.04 0.11 0 0 0 0
Fetch 3553 51.58 2256.05 405620 552615 0 1776
total 7105 51.67 2256.21 405620 552615 0 1776
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Parsing user id: 57 (XAJTDB) (recursive depth: 2)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
0 SORT (AGGREGATE)
0 FIRST ROW
0 INDEX MODE: ANALYZED (FULL SCAN (MIN/MAX)) OF
'CONECT_01_PK' (INDEX (UNIQUE))
*SELECT MAX(UTCTIME)*
*FROM*
*STATUS_01 WHERE POINTNUMBER=:device_1*
call count cpu elapsed disk query current rows
Parse 8206 0.20 0.15 0 0 0 0
Execute 8206 0.25 0.55 0 0 0 0
Fetch 16412 23.09 38.80 39 869129 0 8206
total 32824 23.54 39.50 39 869129 0 8206
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 57 (XAJTDB) (recursive depth: 2)
Rows Row Source Operation
1 SORT AGGREGATE (cr=35 pr=33 pw=0 time=209038 us)
1 FIRST ROW (cr=35 pr=33 pw=0 time=209020 us)
1 INDEX FULL SCAN (MIN/MAX) STATUS_01_PK (cr=35 pr=33 pw=0 time=209019 us)(object id 79195)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 SORT (AGGREGATE)
1 FIRST ROW
1 INDEX MODE: ANALYZED (FULL SCAN (MIN/MAX)) OF
'STATUS_01_PK' (INDEX (UNIQUE))
*OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS*
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 0 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
*OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS*
call count cpu elapsed disk query current rows
Parse 97568 4.17 4.94 0 38 2 0
Execute 111405 146.92 2382.98 465031 1337316 1715361 85314
Fetch 46033 75.20 2297.66 406057 1461528 0 36908
total 255006 226.29 4685.59 871088 2798882 1715363 122222
Misses in library cache during parse: 8451
Misses in library cache during execute: 153
94798 user SQL statements in session.
4557 internal SQL statements in session.
99355 SQL statements in session.
48 statements EXPLAINed in this session.
Trace file: xa212_j000_14811348.trc
Trace file compatibility: 10.01.00
Sort options: fchela
1 session in tracefile.
94798 user SQL statements in trace file.
4557 internal SQL statements in trace file.
99355 SQL statements in trace file.
8398 unique SQL statements in trace file.
48 SQL statements EXPLAINed using schema:
XAJTDB.prof$plan_table
Default table was used.
Table was created.
Table was dropped.
707680 lines in trace file.
2502 elapsed seconds in trace file.I think the memory settings are correct.
May bring me ideas on these overall results indicate?
The tables involved have a large volume of data (to 15 million, as appropriate). They are not partitioned (remember is Standard Edition) , is this one of the reasons why the job run so slow?.
Please require me more information if necessary.
Thanks!
Edited by: user12086565 on 26/03/2013 07:38
Edited by: user12086565 on 26/03/2013 09:31
Hi, here the output of the information request:
PROMPT ALTER TABLE xajtdb.status_01 ADD CONSTRAINT status_01_pk PRIMARY KEY
ALTER TABLE xajtdb.status_01
ADD CONSTRAINT status_01_pk PRIMARY KEY (
utctime,
pointnumber
USING INDEX
TABLESPACE xa_hisr_hist_data_ts
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 1310720 K
NEXT 0 K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
PROMPT ALTER TABLE xajtdb.conect_01 ADD CONSTRAINT conect_01_pk PRIMARY KEY
ALTER TABLE xajtdb.conect_01
ADD CONSTRAINT conect_01_pk PRIMARY KEY (
utctime,
pointnumber
USING INDEX
TABLESPACE xa_hisr_hist_data_ts
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 647168 K
NEXT 0 K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
select
table_name,num_rows,
blocks,avg_space,
chain_cnt,avg_row_len,
sample_Size
from dba_tables
where table_name = 'CONECT_01';
TABLE_NAME NUM_ROWS BLOCKS AVG_SPACE CHAIN_CNT AVG_ROW_LEN SAMPLE_SIZE
CONECT_01 16195993 92861 1738 0 24 5484
===============================================================================
select
table_name,num_rows,
blocks,avg_space,
chain_cnt,avg_row_len,
sample_Size
from dba_tables
where table_name = 'STATUS_01';
TABLE_NAME NUM_ROWS BLOCKS AVG_SPACE CHAIN_CNT AVG_ROW_LEN SAMPLE_SIZE
STATUS_01 46835851 262443 948 0 23 5563
===============================================================================
select
index_name,num_rows,
leaf_blocks,sample_Size
from dba_indexes
where table_name = 'CONECT_01';
INDEX_NAME NUM_ROWS LEAF_BLOCKS SAMPLE_SIZE
CONECT_01_PK 15883091 84054 199734
CONECT_01_I_POINT 16110657 85489 217286
===============================================================================
select
index_name,num_rows,
leaf_blocks,sample_Size
from dba_indexes
where table_name = 'STATUS_01';
INDEX_NAME NUM_ROWS LEAF_BLOCKS SAMPLE_SIZE
I_STATUS_01_POINT 45950607 235104 210693
STATUS_01_PK 46651458 242459 204916
===============================================================================
select OWNER,TABLE_NAME,NUM_DISTINCT,LAST_ANALYZED
from ALL_TAB_COLUMNS
where TABLE_NAME = 'CONECT_01’;
OWNER TABLE_NAME NUM_DISTINCT LAST_ANALYZED
XAJTDB CONECT_01 5646 01/04/2013 22:19:12
XAJTDB CONECT_01 2777 01/04/2013 22:19:12
XAJTDB CONECT_01 695 01/04/2013 22:19:12
XAJTDB CONECT_01 5 01/04/2013 22:19:12
===============================================================================
select OWNER,TABLE_NAME,NUM_DISTINCT,LAST_ANALYZED
from ALL_TAB_COLUMNS
where TABLE_NAME = 'STATUS_01';
OWNER TABLE_NAME NUM_DISTINCT LAST_ANALYZED
XAJTDB STATUS_01 5626 01/04/2013 22:21:17
XAJTDB STATUS_01 8342 01/04/2013 22:21:17
XAJTDB STATUS_01 27 01/04/2013 22:21:17
XAJTDB STATUS_01 2 01/04/2013 22:21:17
===============================================================================Thanks!
Similar Messages
-
Impact Analysis: How to trace which objects and tables used in a report?
Impact Analysis: How to trace which Webi objects and tables used in a report?
Currently, our company have been using BO Webi as our ad-hoc and reporting tool for over a year now. Past several months, we've been pushing our power users to develop their own report, and started to notice that we loss track off which data (tables, columns, ... , BO objects) being used where and by whom. The BI team now spend more time tracing through reports manually, instead of designing Universe.
After consulted with our local SAP technical sale, they said the only solution is to buy BO's ETL (Data Integration) and
Metadata Management tool, which price starting from $300K per CPU. I suppose that is NOT the right solution; however, we have not found one yet. Some executives believe Cognos (now by IBM) would provide a better BI solution as we scale.
If anyone know, please provide (1) Impact Analysis method: How to trace which Webi objects and tables used in a report? and (2) Does Cognos provide better impact analysis method without a heavy spending?
Thank you very much,
Ed
Edited by: EdPC-SCB on Sep 8, 2009 3:56 PMEdPC-SCB,
have you tried enabling auditing?
- Yes, audit log only shows user's activities which isn't useful for us. Please let us know any audit log that might be helpful .
For most of the servers listed in the CMC there is an "Audit" tab. I'd say if you have the disk space in your database for Auditor available, then if in doubt turn it on (at least for a while) to see if it exposes what you are seeking to find out --that'd be the quickest way. The documentation (xir2_bip_auditor_en.pdf) doesn't offer much in helping you to see a correlation between ticking on an Audit option in a Server and how it will populate in the Auditor DB -- most of us just hunt and peck until we get what we want. Once you have the good stuff in each of the Servers ticked on you'll be able to track down which report recieves which object. To help youself out initially, you should run every report that you can find so Auditor will get seeded.
thanks,
John -
Hi Experts,
i have an null pointer exception error in a message on adapter engine level.
It's allways the same message what occurs this error.
The message content in netweaver message monitoring contains following error:
Application error occurred during request processing.
Details: Error [javax.servlet.ServletException: null], with root cause [java.lang.NullPointerException: null].
Exception id: [0019B9F3058800A2000005E400001834000496E2E17B13EF]
I have read the sap note 859465. There is recommended to take a look in the stack trace.
Now i want to analyse the stack trace of the pi.
But i have no idea where to find that stack trace.
Can somebdy help me?
Many thanks!!!if you are using PI 7.1, then use NWA and Java system reports/log viewer link to get details
or by default you can find them - /usr/sap/<SID>/DVEBGS001/j2ee/cluster/server0/log. -
SQL TRACE/TKPROF VS SQL ACCESS ADVISOR
Hi All,
Can anyone please tell me what's the exact difference between SQL TRACE/TKPROF and SQL ACCESS ADVISOR in Oracle 10g.(By showing some examples)
And also why should I go for SQL ACCESS ADVISOR ?? (Since I have used the former all these days) :)
Why can't I still use SQL TRACE/TKPROF.
Please if anyone can pour light on this. Thanks in Advance.
Regards,
Marlon.Better go through below link........
http://www.remote-dba.net/oracle10g_tuning/t_sqlaccess_advisor.htm_
-Ek -
오라클 9i에서 trace와 tkprof 관련 질문입니다.
오라클 9i에서 trace 한것을 와 tkprof 로 확인 할때
row source operation에 아래와 같이 소요시간 표시하도록 할 수 없나요?
trace level을 12로 해도 " 10 INDEX RANGE SCAN XSOFT_TEMP_N1" 이부분 까지만 나와서요.
Rows Row Source Operation
10 INDEX RANGE SCAN XSOFT_TEMP_N1 (cr=1277 pr=1276 pw=0 time=242396 us)(object id 844722)
답변 부탁드립니다.10g 에서만 가능합니다.
-
BI analysis auths and traces don't work after client copy
Hello,
We recently moved our BI Development to a new server. Now, the analysis authorizations I created and assigned to the S_RS_AUTH object are no longer working. And, the 'Execute as User' feature in rsecadmin transaction to trace a user is no longer working.
Do I need to regenerate something or reconfigure something?
I inherited this system and was not the original person to set up BI authorizations and traces so I do not know what steps may need to be repeated after a client copy.
Thanks, in advance, for any advice.Thank you Juilius.
It was actually our Developer who made changes to the reports I was testing and really didn't have anything to do with the client copy.
However, the trace functionaly was weird. I had to change a parameter on my user id to get it to work. So, actually, the client copy did change that setting.
Thanks much.
Penny -
In solman_workcenter - RCE- E2E analysis tabs change,trace is not appering
Hi,
Initisaled EHp1 and done initial and basic configuration using Transaction SOLMAN_SETUP successfully.
SMD + wily installed succeesfully in satellite system system
I can see the satellite system data in Introscope Webview
Extractor Framework jobs are running fine.
But In Solution manager, in transaction Solman_Workcenter->root cause analysis->E2E Analysis i am not getting Workload Analysis, Change Analysis and exception analysis tabs.
just i am getting systems in E2E analysis. why above tabs are not showing
besides standard View there is no tabs.
Regards,
ARHi Jagan,
Now i am able to see the worload,trace analysis tabs .. but under workload,trace analysis etc no data is showing.
1) under workload analysis -> P07 Enterprise portal ->J2ee
it's saying that no applicaqtion data found and for some tabs empty (just white) screen is showing and for some tabs it's
2)under workload analysis -> P07 Enterprise portal ->Host
giving Error loading template 0TPL_0SMD_MPEH_WA_Q0018_H for host tab
I am able to see only one graph i.e under workload analysis -> overview.
Best Regards,
AR -
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 MutyaboyinaYou might find [url http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]this link useful.
Regards,
Rob. -
SQL Trace(tkprof) option in TOAD
I am getting insufficient privilages error for the same.
Pl help me.There is a hidden parameter called tracefiles_public that you can normally convince the DBAs to set for development instances that will set the umask for trace files to be globally readable then you can either:
(1) get access to the server machine at the o/s level and copy across your trace files and trace them locally
(2) telnet/ssh/something on to the server and trace them there
(3) If you search this forum there are postings on how to use external tables/utl_file to open the remote .trc file on the server and transfer it to your client.
If you can't get tracefiles_public (search asktom.oracle.com for some reinforcements if you need some backup to get permissions) then you'll need to bug the DBAs regularly to get read permissions on specific trace files. In general experience you won't need to bug them for more than 3 trace file permission changes before they give you access, unless it is a locked down prod box. -
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,
AnushreeIn 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. -
Urgent : How to do the SQL trace analysis
Hi Floks,
How to do the SQL Trace analysis and any another tools is there to test abap programming then this tools runtime analysis,extended Programming Checking,Code inspector .How to utilize that tools .please forward me
thanks
sureshHI,
<b>SQL Trace Use:</b>
The SQL Trace function is an on-demand log of selected SQL statements that are issued against the database through the Open SQL Engine. The SQL Trace can be switched on or off dynamically. The log format is database independent. Besides the SQL statement text, each log record contains information about the point in time when the statement was executed, its duration, its input parameters and results (where applicable) as well as context information.
<b>
Features</b>
The SQL Trace is especially useful for:
Development
SQL Trace can help JDO, enterprise beans, servlet and JSP developers to learn which kind of database accesses their code produces.
1. Performance analysis
Typically, performance issues are caused by inefficient database accesses. In this case SQL Trace can be used to show the issued SQL statements and their duration, thus helping to identify inefficient SQL statements.
<b>Activities</b>
Typically, you should use the SQL Trace when you need to check the behavior of a particular application. This is the following scenario:
Look at the below links, you will get the idea
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/801f89454211d189710000e8322d00/content.htm
Re: Runtime Analysis vs SQL Trace
http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html -
Trace application activity in Database side
Hi all
We are using Oracle database 11g (Release 11.1.0.6.0 - 64bit Production) for database and a billing system for client application. Every end of month we are running bill calculation from the front end of our billing system.
The thing i want to do is to know or to get step by step each transaction executed by the Billing application when we launch the bill calculation and bill generation task from the application.
Someone does knows how to proceed on that.
I want to know thwe tables and procedures or function used by the Bill system engine for tuning purpose.
The Os is Linux red hat 5.
Thank you.
Lucienot.Use TRACE/TKPROF (with wait events) to trace the session that runs the bill calculation.
You might need some help from your DBA.
See:
http://www.oracle-base.com/articles/10g/sql-trace-10046-trcsess-and-tkprof-10g.php
http://docs.oracle.com/cd/E11882_01/server.112/e16638/sqltrace.htm#PFGRF01010
http://docs.oracle.com/cd/E11882_01/server.112/e16638/sqltrace.htm#PFGRF01020 -
ESYU: R12 - R12 Trace/Debug file을 생성하는 방법
Purpose
Version: 12.0
Information in this document applies to any platform.
R12에서 Trace와 Debug file 생성 방법을 알아본다.
Solution
1. Navigate Responsibility: System Administrator> Profile> System>Query
User: Trace를 생성할 user 명을 입력
Profile: Initialization SQL Statement - Custom
2. User columne에 아래의 내용을 입력
begin fnd_ctl.fnd_sess_ctl('','','TRUE','TRUE','LOG','ALTER SESSION SET EVENTS='||''''||'10046 TRACE NAME CONTEXT FOREVER,LEVEL 12'||''''); end;
3. 입력한 내용을 저장
FND debug messages를 생성:
4. Navigate Responsibility: System Administrator> Profile> System>Query
User: Debug를 생성할 user 명을 입력
Profile: FND:%Debug%
5. 아래 profile options 값을 user level로 set
FND: Debug Log Enabled Yes
FND: Debug Log Filename <empty>
FND: Debug Log Level STATEMENT
FND: Debug Log Mode Asynchronous with Cross-Tier Sequencing
FND: Debug Log Module %
6. 입력한 내용을 저장
Example:
7. Navigate: Payables Responsibility> Other> Request> Run> Select and Submit the Report
(특정 Report를 실행한다)
8. Trace 와 FND Debug messages를 disable
9. FND Debug message를 찾기위해 아래 query를 실행
select log_sequence, timestamp, module,message_text
from fnd_log_messages fnd
where trunc(timestamp) = trunc(sysdate)
and (module like '%xla.%' or module like '%ap.%')
and trunc(timestamp) = trunc(sysdate)
order by timestamp;
SELECT log_sequence, message_text,substr(module,1,100)
FROM fnd_log_messages msg
, fnd_log_transaction_context tcon
WHERE msg.TRANSACTION_CONTEXT_ID = tcon.TRANSACTION_CONTEXT_ID
AND tcon.TRANSACTION_ID= /*Give the request id of accounting program*/
ORDER BY LOG_SEQUENCE desc
Debugging의 활성화를 위해 아래 profile option을 사용:
FND: Debug Log Enabled : Yes
FND: Debug Log Level : Statement
Debug message를 얻기 위해 아래 query 문을 사용:
SELECT substr(module,1,70), MESSAGE_TEXT, timestamp, log_sequence
FROM fnd_log_messages msg, fnd_log_transaction_context tcon
WHERE msg.TRANSACTION_CONTEXT_ID = tcon.TRANSACTION_CONTEXT_ID
AND tcon.TRANSACTION_ID = <your child request ID>
ORDER BY LOG_SEQUENCE
10. 아래 SQL을 이용해 trace file이 생성되는 위치를 확인, raw trace와 tkprof'd trace
file을 upload
select value
from v$parameter
where name = 'user_dump_dest';
Reference
Note 458371.1 -
Hai All,
Can somebody describe me or refer to documentation that describes analysis of ALAP trace. Let me aloberate this.
I executed a report and from settings, I switched on the "Trace" and then disconnected, refreshed, logged in and executed the report. Now When I click on setting, "Display trace", there is a notepad showing the trace. I need to analyze this.
Can someody tell me how I can analyze the trace?
Thank you very much.What exactly are you looking in the Trace for?
The Trace you enable from BEx Analyzer is only for the communication from BEx Analyzer macro to the back end system. If you are looking for the OLAP trace you can enable the trace from tcode RSRTRACE or try executing the query from RSRT2 in debug mode setting break points in the required programs.
RSRTRACE can be enabled for any users and you can alayze the trace by going thru each ABAP Objects which was executed in the back end when you ran the query.
Thanks. -
Difference between Runtime Anlaysis & SQL Tracer
What is the difference between Runtime Analyasis * SQL Tracer, and what is special use of individual Tools
Runtime analysis and SQL trace ar both used for an Performance tunning of an ABAP programs (any) ...
because when you run huge reports it will take some time ..... and it will cause other customer users those whoare making transcation to the same tables .... so for that the proragms are tunned ....by using some process which was standardly given by sap ...
ST05 -> SQL Trace .
SE30 -> RUNTIME ANALYSIS
in runtime analysis you see the time taken by the system and the data utilised , database tables accesses and its time...etc .
in sql trace you can swithc off/on the trace of any running programs so that you can se the specific of any ABAP porgrams ... which has taken time for which table ... which SQL query....etc ...
so basicaly in the SQL trace it was checking of the sequesnce of the table query for SELECT,
UPDATE
MODIFY
INSERT
DELETE
REFRESH ....etc ....
Girish
Maybe you are looking for
-
Status change from 'Completed' to 'In Process' not allowed
When configuring Appraisals in R/3 we want to change the Status of 'Completed' when pressing the 'Reject' button so that it moves to the Target Status of 'In Process' However, we are getting an error message: Status change from 'Completed' to 'In Pr
-
Why can't I print out google maps on my hp photosmart premium c410?
I'm set up wireless and it works good except when I try to print out a map from google maps and sometimes from yahoo maps. Can someone help with this? I also have a hp 1350 all in one I have to usb plug in when printing from google maps. I'm running
-
Cancelation of excise invoice in return process
Hi guru's When we do the return order for customer return,how excise duty will be captured ? regards SREENIVAS
-
Ok, once & for all I have to get the CORRECT answer to this question Several years ago someone who clearly knew more than anyone else who responded to our hiring ad told me that while you can create a PDF with editable regions & the viewer can fill o
-
Is it bad to Over charge apple drvice
Is it bad for battery to over charge a iPad