Top activity (red bar) enterprise manager
Hi I am new to oracle 10g and performance tuning;
When I look at the top activity from enterprise manager, I notice that one person has red bar(which is making update).The activity is around %65, and the user said that the system hangs, it takes too long to finish the operation.
Does the red bar occurs in update statements? What can be solution
No one reading this has even the slightest idea of what red bar on what page and how it might or might not relate to any DML statement.
Drill down and find out what is happening for that specific user having the issue. What were they doing? What SQL statement. Does it correspond with top SQL in OEM Grid?
Then run ADDM and Explain Plan and if you can't figure out what is happening post the SQL statement and the explain plan (created using DBMS_XPLAN) and any relevant index information and we'll take a look.
Similar Messages
-
Top activity chart on Enterprise manager
Hi,
The Top activity chart is not empty on the Enterprise manager of a 2 node 11gR2 RAC DB,
the statistics_level is set to "typical".
NAME TYPE VALUE
optimizer_use_pending_statistics boolean FALSE
statistics_level string TYPICAL
timed_os_statistics integer 0
timed_statistics boolean TRUE
$emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
https://xx.xx.xx:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/xxx01_orcl/sysman/log
$emctl status agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
Agent Version : 10.2.0.4.4
OMS Version : 10.2.0.4.4
Protocol Version : 10.2.0.4.4
Agent Home : /u01/app/oracle/product/11.2.0/db_1/xxx01_orcl
Agent binaries : /u01/app/oracle/product/11.2.0/db_1
Agent Process ID : 815
Parent Process ID : 801
Agent URL : https://xxx.xx.xx:3938/emd/main
Repository URL : https://xx.xx.xx:1158/em/upload/
Started at : 2013-09-20 06:39:57
Started by user : oracle
Last Reload : 2013-12-09 19:37:51
Last successful upload : 2013-12-26 09:47:31
Total Megabytes of XML files uploaded so far : 3257.08
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 54.07%
Data channel upload directory : /u01/app/oracle/product/11.2.0/db_1/xxxx01_orcl/sysman/recv
Last successful heartbeat to OMS : 2013-12-26 09:49:41
Agent is Running and Ready
How can I enable the Top Activity chart on the Enterprise manager console.
Thanks in advance.There is no pending upload in the EM Agent,
STATISTICS_NAME ACTIVATION_LEV SYSTEM_STATUS STATISTICS_VIEW_NAME SESSIO
Buffer Cache Advice TYPICAL ENABLED V$DB_CACHE_ADVICE NO
MTTR Advice TYPICAL ENABLED V$MTTR_TARGET_ADVICE NO
Timed Statistics TYPICAL ENABLED YES
Timed OS Statistics ALL DISABLED YES
Segment Level Statistics TYPICAL ENABLED V$SEGSTAT NO
PGA Advice TYPICAL ENABLED V$PGA_TARGET_ADVICE NO
Plan Execution Statistics ALL DISABLED V$SQL_PLAN_STATISTICS YES
Shared Pool Advice TYPICAL ENABLED V$SHARED_POOL_ADVICE NO
Modification Monitoring TYPICAL ENABLED NO
Longops Statistics TYPICAL ENABLED V$SESSION_LONGOPS NO
Bind Data Capture TYPICAL ENABLED V$SQL_BIND_CAPTURE NO
Ultrafast Latch Statistics TYPICAL ENABLED NO
Threshold-based Alerts TYPICAL ENABLED NO
Global Cache Statistics TYPICAL ENABLED NO
Active Session History TYPICAL ENABLED V$ACTIVE_SESSION_HISTORY NO
Undo Advisor, Alerts and Fast TYPICAL ENABLED V$UNDOSTAT NO
Ramp up
Streams Pool Advice TYPICAL ENABLED V$STREAMS_POOL_ADVICE NO
Time Model Events TYPICAL ENABLED V$SESS_TIME_MODEL YES
Plan Execution Sampling TYPICAL ENABLED V$ACTIVE_SESSION_HISTORY YES
Automated Maintenance Tasks TYPICAL ENABLED NO
SQL Monitoring TYPICAL ENABLED V$SQL_MONITORING YES
Adaptive Thresholds Enabled TYPICAL ENABLED NO
V$IOSTAT_* statistics TYPICAL ENABLED NO
23 rows selected. -
Top sql in java enterprise manager 10G
i,
in the java enterprise manager 9i, I could use 'top sql', 'top sessions' from the java applications.
I recently installed 10G enterprise manager client, and I now miss the top sql and top sessions apps.
I know that they are available in the web interface for enterprise manager 10G, but I can't use the webinterface right now. I would like to use the standalone java enterprise manager. How can I get the top sql in there?
Greetings,
Ivoanybody?
-
Cannt connect oracle enterprise manager(null)..
hey guys i did change the sysman password following the given steps below..
1. Stop the database control using Emctl stop dbconsole.
2. Log on to sqlplus with the sysdba privilege.
3. Then change the password of sysman using “alter user sysman identified by password”.
4. Exit sqlplus.
5. Go to the directory $ORACLE_HOME/sysman/config/
6. Find the file emoms.properties.emca and edit it.
7. Change the values of the following parameters
eml.mntr.emdRepPwd=new_password
oracle.sysman.eml.mntr.emdRepPwdEncrypted=FALSE
8. Now restart the database control and then the emdRepPwdEncrypted will automatically become true and the new password will become encrypted.
now when i try to connect to the database control it says oracle enterprise manager (NULL) at the top and at bottom
Enterprise Manager is not able to connect to the database instance. The state of the components are listed below.
instance open
listener up
agent connection to instance succeded..
what do i do now..thanks dude recreating the emctl repository did work..
i used the following commands.
Emca -deconfig dbcontrol db -repos drop
Emca -config dbcontrol db -repos create
but now is recreating the repository similar to droping the repository and recreating it.. and will there be any problems involved in doing so.. because i happen to see it doing some thing with dbms_jobs etc.. -
Top activity on enterprise manager
Hi
I am using grid control.
When I check one of my database, I notice that there is no graph in top activity page !!!!! , the top sql and the top sessions parts are also empty. Nothing is shown...
There was no problem before...
Other than top activity everything is normal.
What is the reason for this? and Any suggestion
Oracle Database Version: 10.1.0.5.0
Grid Control agent version: 10.2.0.1.0
I tried restarting the agent, it didnt solve the problem..Check the agent status and see if the metrics XML files are pending upload.
Check in OEM to see the status of the agent.
Try to run "emctl clearstate agent"
Upgrade the OEM agent to a higher version - e.g. 10.2.0.5 -
Shrink database is not active in SQL SERVER Enterpriser manager
Dear guru
Shrink database is not active in SQL SERVER Enterpriser manager what to do
Rupesh
SAP BASIS ConsultantHi,
>Thank you very much for not supporting i have solved the problem by reading some other documents
That's exactly what I wanted you to do : With a little personal work, you can actually learn to do your own work ! "Don't give fish to hungry people. Teach them how to go fishing !"
Regards,
Olivier -
Appreciate specific steps to ensure that Oracle Enterprise Manager 10.2.0.3 is installed as baseline for upgrade.
Red Hat Linux Enterprise 5.2 64bit.
The major problems are with the Configuration Assistant Web Cache during the Install. It fails with OUI-25031.
The configToolFailedCommands script contents is:
oracle.sysman.emcp.agent.AgentPlugInThe root cause of Oracle Grid 10.2.0.3 did not install successfully was because of a Network Configuration Issue. i.e., some strange IP was being referenced over the internet and mapping it to my hostname of my server. I performed a "dig hostname" to see what ip was being associated with my so-called unique hostname. After fixing that problem and removing all of Oracle, I only had one warning with OPMN not starting. I discovered additional rpms that needed to be installed and all is good now until the next opportunity.
Learned Lesson: Pay Very Careful Attention to all configuration components and document as you go to ensure that you have your process documented. -
How to configure Enterprise Manager in Active Data Guard?
Hi,
I have installed oracle 11g r2 rac with asm in two nodes. OS is hp-Unix.
I have installed oracle11g Active Data Guard using Single alone Database.
Both RAc and Active Data Guard works fine.
I have not configure Data Guard Broker.
Question: How to configure Enterprise Manager in Active Data Guard?
Thanks
Solaimanhttp://www.gokhanatil.com/2012/04/manage-your-existing-data-guards-with.html
-
Hello!
A have noticed some bad performance on database, Enterprise manager says the next query is top query.
SELECT ID ,
MIME_TYPE ,
BLOB_CONTENT,
FILENAME ,
FILE_CHARSET,
FILE_TYPE ,
FLOW_ID ,
CREATED_ON ,
LAST_UPDATED
FROM WWV_FLOW_FILE_OBJECTS$
WHERE FILENAME = :B2
AND SECURITY_GROUP_ID = :B1
I know its apex schema, but where is this code?
also it says about virtual circuit wait.
can you help me understand what is happening?Christian
Thank you very much,
I switched to Apex Listener over Weblogic Server that was already working, just added a new managed server and deployed apex.war and i.war on it.
the server resources are very good now. -
Anytime I try to adjust settings, FF4rc forgets them and restarts with those two WindowsXP Active Title Bars, one inside the other. In other words, I see 2 sets of Minimize/Max/Close buttons on the right. The only setting it remembers is the "Use Small Icons" option inside the toolbar custom settings.
Was there a glitch in the update process? I notice the FF button is no longer alongside the tabs on top and would like to restore that like it was in b12...Hi
I restarted firefox in safemode on my xp machine disabled all addons and restarted and then progressively enabled each addon. For me one that caused the problem we both appear to have was Tabmix plus 0.3.8.5
Don't know if there is a newer version but I am using tab utilities which works fine. -
Flashing red bar on top of iphone screen
Hi there. I was reading already a bit about the red status bar here in the forum but some of my questions remain unanswered.
I understand so far - please correct me if I'm wrong - that the red status on the top of the screen is popping up sometimes for some seconds to remind me that there are background applications running.
My questions:
- I know that there are background applications running (for example 8mm camera app or hipstamatic camera app), but can I turn that notification off? I want those apps running in the background because I use them very often. Or do they suck energy when they're running in the background? I mean: they are basically just open, doing nothing.
- every time the red notification bar pops up my itunes stops. it's annoying. how can i turn these notifications off and prevent itunes from stopping playing music?
Thanks for your help!Thanks for the response. But now:
- why for **'s sake is apple keeping all the applications running in the background anyway. why is there no function in the settings to close certain apps automatically after using them? i really don't want to take a photo or film and swap to another application and then manually have to close the application. that's like 6 wasted seconds of my life by doing unnecessary work and if i multiply that with the amount of photos/films i take (~30 per day) then i'm wasting about 18.5 hours per year just on closing the application after I've done a photo. so i want to keep that app running in the back so it's open all the time.
- anyhow: i've closed the app (8mm app) and even restarted the iphone. the red bar with "8mm" still pops up. huh!? -
# Question
Cannot log on to Firefox, I get this message in a bold red bar across the top of the screen
"The bookmarks and history system will not be functional because one of Firefox’s files is in use bay another application. Some security software can cause this problem"
The window hangs and have to cold boot to bring up the browser. The computer says that I am connected to the internet.The instructions on the Adobe site are outdated and do no longer apply to current Firefox versions and you can ignore those instructions and save the Adobe installer to your desktop and start the installation with a double-click on that file.
See [[How do I edit options to add Adobe to the list of allowed sites]] -
Oracle 10g Enerprise Manager on Red Hat Enterprise 3.0
I am installing Enterprise manager with a new database and using all defaults. I get an error when the HTTP Server is being installed stating that it can not connect to http://atla-oms-db1:1830/em/main. Can anyone tell what could be wrong? Thanks!!!
Since you used default install, If you are going into Grid Control just enter
http://atla-oms-db1/em
If you are going into Application Server just enter
http://atla-oms-db1:1830
You do not need the em/main -
This SQL statement always in Top Activity, with PX Deq Credit: send blkd
Hi gurus,
The following SQL statement is always among the Top Activity. I can see the details in Enerprise manager that it suffers from PX Deq Credit: send blkd
This is the statement:
SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
S.LOC_CODE
FROM V_STOCK_DETAIL S
JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode;The statement is invoked by our front end (web based app) for a browse table displayed on a web page. The result can be 10 to 8000. It is used to display the current stock availability for a particular product in a particular warehouse. The stock availability it self is kept in a View : V_Stock_Detail
These are the parameters relevant to the optimizer:
SQL> show parameter user_dump_dest
user_dump_dest string /u01/app/oracle/admin/ITTDB/udump
SQL> show parameter optimizer
_optimizer_cost_based_transformation string OFF
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.3
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
SQL> show parameter db_file_multi
db_file_multiblock_read_count integer 16
SQL> show parameter db_block_size column sname format a20 column pname format a20
db_block_size integer 8192Here is the output of EXPLAIN PLAN:
SQL> explain plan for
SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
S.LOC_CODE
FROM V_STOCK_DETAIL S
JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode
Explain complete.
Elapsed: 00:00:00:31
SQL> select * from table(dbms_xplan.display)
PLAN_TABLE_OUTPUT
Plan hash value: 3252950027
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ
Distrib |
| 0 | SELECT STATEMENT | | 1 | 169 | 6 (17)| 00:00:01 | | |
|
| 1 | PX COORDINATOR | | | | | | | |
|
| 2 | PX SEND QC (RANDOM) | :TQ10003 | 1 | 169 | 6 (17)| 00:00:01 | Q1,03 | P->S | QC
(RAND) |
| 3 | HASH GROUP BY | | 1 | 169 | 6 (17)| 00:00:01 | Q1,03 | PCWP |
|
| 4 | PX RECEIVE | | 1 | 169 | 6 (17)| 00:00:01 | Q1,03 | PCWP |
|
| 5 | PX SEND HASH | :TQ10002 | 1 | 169 | 6 (17)| 00:00:01 | Q1,02 | P->P | HA
SH |
| 6 | HASH GROUP BY | | 1 | 169 | 6 (17)| 00:00:01 | Q1,02 | PCWP |
|
| 7 | NESTED LOOPS OUTER | | 1 | 169 | 5 (0)| 00:00:01 | Q1,02 | PCWP |
|
| 8 | MERGE JOIN CARTESIAN | | 1 | 119 | 4 (0)| 00:00:01 | Q1,02 | PCWP |
|
| 9 | SORT JOIN | | | | | | Q1,02 | PCWP |
|
| 10 | NESTED LOOPS | | 1 | 49 | 4 (0)| 00:00:01 | Q1,02 | PCWP |
|
| 11 | BUFFER SORT | | | | | | Q1,02 | PCWC |
|
| 12 | PX RECEIVE | | | | | | Q1,02 | PCWP |
|
| 13 | PX SEND BROADCAST | :TQ10000 | | | | | | S->P | BR
OADCAST |
|* 14 | INDEX RANGE SCAN | PRODUCTS_IDX2 | 1 | 25 | 2 (0)| 00:00:01 | | |
|
| 15 | PX BLOCK ITERATOR | | 1 | 24 | 2 (0)| 00:00:01 | Q1,02 | PCWC |
|
|* 16 | MAT_VIEW ACCESS FULL | MV_CONVERT_UOM | 1 | 24 | 2 (0)| 00:00:01 | Q1,02 | PCWP |
|
| 17 | BUFFER SORT | | 1 | 70 | 2 (0)| 00:00:01 | Q1,02 | PCWP |
|
| 18 | BUFFER SORT | | | | | | Q1,02 | PCWC |
|
| 19 | PX RECEIVE | | 1 | 70 | 4 (0)| 00:00:01 | Q1,02 | PCWP |
|
| 20 | PX SEND BROADCAST | :TQ10001 | 1 | 70 | 4 (0)| 00:00:01 | | S->P | BR
OADCAST |
|* 21 | TABLE ACCESS BY INDEX ROWID| STOCK | 1 | 70 | 4 (0)| 00:00:01 | | |
|
|* 22 | INDEX RANGE SCAN | STOCK_PK | 1 | | 2 (0)| 00:00:01 | | |
|
|* 23 | TABLE ACCESS BY INDEX ROWID | MV_TRANS_STOCK | 1 | 50 | 3 (0)| 00:00:01 | Q1,02 | PCWP |
|
|* 24 | INDEX RANGE SCAN | MV_TRANS_STOCK_IDX1 | 1 | | 2 (0)| 00:00:01 | Q1,02 | PCWP |
|
Predicate Information (identified by operation id):
14 - access("P"."PRODUCT"=:PPRODUCT)
16 - filter("CON"."PRODUCT"=:PPRODUCT)
21 - filter("STOCK"."LOC_CODE"=:PLOCCODE)
22 - access("STOCK"."PRODUCT"=:PPRODUCT AND "STOCK"."WH_CODE"=:PWHCODE)
23 - filter("STS"(+)='N')
24 - access("PRODUCT"(+)=:PPRODUCT AND "WH_CODE"(+)=:PWHCODE AND "LOC_CODE"(+)=:PLOCCODE AND "RACK"(+)="STOCK"."RACK" AND
"BATCH"(+)="STOCK"."BATCH" AND "EXP_DATE"(+)="STOCK"."EXP_DATE")
42 rows selected.
Elapsed: 00:00:00:06Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
SQL> SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
S.LOC_CODE
FROM V_STOCK_DETAIL S
JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode
Execution Plan
0 SELECT STATEMENT Optimizer Mode=ALL_ROWS 1 169 6
1 0 PX COORDINATOR
2 1 PX SEND QC (RANDOM) SYS.:TQ10003 1 169 6 :Q1003 P->S QC (RANDOM)
3 2 HASH GROUP BY 1 169 6 :Q1003 PCWP
4 3 PX RECEIVE 1 169 6 :Q1003 PCWP
5 4 PX SEND HASH SYS.:TQ10002 1 169 6 :Q1002 P->P HASH
6 5 HASH GROUP BY 1 169 6 :Q1002 PCWP
7 6 NESTED LOOPS OUTER 1 169 5 :Q1002 PCWP
8 7 MERGE JOIN CARTESIAN 1 119 4 :Q1002 PCWP
9 8 SORT JOIN :Q1002 PCWP
10 9 NESTED LOOPS 1 49 4 :Q1002 PCWP
11 10 BUFFER SORT :Q1002 PCWC
12 11 PX RECEIVE :Q1002 PCWP
13 12 PX SEND BROADCAST SYS.:TQ10000 S->P BROADCAST
14 13 INDEX RANGE SCAN ITT_NEW.PRODUCTS_IDX2 1 25 2
15 10 PX BLOCK ITERATOR 1 24 2 :Q1002 PCWC
16 15 MAT_VIEW ACCESS FULL ITT_NEW.MV_CONVERT_UOM 1 24 2 :Q1002 PCWP
17 8 BUFFER SORT 1 70 2 :Q1002 PCWP
18 17 BUFFER SORT :Q1002 PCWC
19 18 PX RECEIVE 1 70 4 :Q1002 PCWP
20 19 PX SEND BROADCAST SYS.:TQ10001 1 70 4 S->P BROADCAST
21 20 TABLE ACCESS BY INDEX ROWID ITT_NEW.STOCK 1 70 4
22 21 INDEX RANGE SCAN ITT_NEW.STOCK_PK 1 2
23 7 TABLE ACCESS BY INDEX ROWID ITT_NEW.MV_TRANS_STOCK 1 50 3 :Q1002 PCWP
24 23 INDEX RANGE SCAN ITT_NEW.MV_TRANS_STOCK_IDX1 1 2 :Q1002 PCWP
Statistics
570 recursive calls
0 physical write total IO requests
0 physical write total multi block requests
0 physical write total bytes
0 physical writes direct temporary tablespace
0 java session heap live size max
0 java session heap object count
0 java session heap object count max
0 java session heap collected count
0 java session heap collected bytes
83 rows processed
Elapsed: 00:00:03:24
SQL> disconnect
Commit complete
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining optionsThe TKPROF output for this statement looks like the following:
TKPROF: Release 10.2.0.3.0 - Production on Thu Apr 23 12:39:29 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Trace file: ittdb_ora_9566_mytrace1.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
S.LOC_CODE
FROM V_STOCK_DETAIL S
JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.04 0.12 0 10 4 0
Fetch 43 0.05 2.02 0 73 0 83
total 45 0.10 2.15 0 83 4 83
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 164
Rows Row Source Operation
83 PX COORDINATOR (cr=83 pr=0 pw=0 time=2086576 us)
0 PX SEND QC (RANDOM) :TQ10003 (cr=0 pr=0 pw=0 time=0 us)
0 HASH GROUP BY (cr=0 pr=0 pw=0 time=0 us)
0 PX RECEIVE (cr=0 pr=0 pw=0 time=0 us)
0 PX SEND HASH :TQ10002 (cr=0 pr=0 pw=0 time=0 us)
0 HASH GROUP BY (cr=0 pr=0 pw=0 time=0 us)
0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
0 MERGE JOIN CARTESIAN (cr=0 pr=0 pw=0 time=0 us)
0 SORT JOIN (cr=0 pr=0 pw=0 time=0 us)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 PX RECEIVE (cr=0 pr=0 pw=0 time=0 us)
0 PX SEND BROADCAST :TQ10000 (cr=0 pr=0 pw=0 time=0 us)
1 INDEX RANGE SCAN PRODUCTS_IDX2 (cr=2 pr=0 pw=0 time=62 us)(object id 135097)
0 PX BLOCK ITERATOR (cr=0 pr=0 pw=0 time=0 us)
0 MAT_VIEW ACCESS FULL MV_CONVERT_UOM (cr=0 pr=0 pw=0 time=0 us)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 PX RECEIVE (cr=0 pr=0 pw=0 time=0 us)
0 PX SEND BROADCAST :TQ10001 (cr=0 pr=0 pw=0 time=0 us)
83 TABLE ACCESS BY INDEX ROWID STOCK (cr=78 pr=0 pw=0 time=1635 us)
83 INDEX RANGE SCAN STOCK_PK (cr=4 pr=0 pw=0 time=458 us)(object id 135252)
0 TABLE ACCESS BY INDEX ROWID MV_TRANS_STOCK (cr=0 pr=0 pw=0 time=0 us)
0 INDEX RANGE SCAN MV_TRANS_STOCK_IDX1 (cr=0 pr=0 pw=0 time=0 us)(object id 143537)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
PX Deq: Join ACK 17 0.00 0.00
PX qref latch 2 0.00 0.00
PX Deq Credit: send blkd 72 1.95 2.00
PX Deq: Parse Reply 26 0.01 0.01
SQL*Net message to client 43 0.00 0.00
PX Deq: Execute Reply 19 0.00 0.01
SQL*Net message from client 43 0.00 0.04
PX Deq: Signal ACK 12 0.00 0.00
enq: PS - contention 1 0.00 0.00
********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'))
PLAN_TABLE_OUTPUT
SQL_ID 402b8st7vt6ku, child number 2
SELECT /*+ gather_plan_statistics */ S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K, FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.P
RODUCT,
Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K, FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P
.UOM_K ),
0) QtyOut_K, FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K, S.LOC_CODE FROM
V_STOCK_DETAIL S JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC
_CODE =
:pLocCode
Plan hash value: 3252950027
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | OMem |
1Mem | Used-Mem |
| 1 | PX COORDINATOR | | 1 | | 83 |00:00:02.25 | 83 | |
| |
| 2 | PX SEND QC (RANDOM) | :TQ10003 | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 3 | HASH GROUP BY | | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 4 | PX RECEIVE | | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 5 | PX SEND HASH | :TQ10002 | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 6 | HASH GROUP BY | | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 7 | NESTED LOOPS OUTER | | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 8 | MERGE JOIN CARTESIAN | | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 9 | SORT JOIN | | 0 | | 0 |00:00:00.01 | 0 | 73728 |
73728 | |
| 10 | NESTED LOOPS | | 0 | 1 | 0 |00:00:00.01 | 0 | |
| |
| 11 | BUFFER SORT | | 0 | | 0 |00:00:00.01 | 0 | 73728 |
73728 | |
| 12 | PX RECEIVE | | 0 | | 0 |00:00:00.01 | 0 | |
| |
| 13 | PX SEND BROADCAST | :TQ10000 | 0 | | 0 |00:00:00.01 | 0 | |
| |
|* 14 | INDEX RANGE SCAN | PRODUCTS_IDX2 | 1 | 1 | 1 |00:00:00.01 | 2 | |
| |
| 15 | PX BLOCK ITERATOR | | 0 | 1 | 0 |00:00:00.01 | 0 | |
| |
|* 16 | MAT_VIEW ACCESS FULL | MV_CONVERT_UOM | 0 | 1 | 0 |00:00:00.01 | 0 | |
| |
| 17 | BUFFER SORT | | 0 | 21 | 0 |00:00:00.01 | 0 | 73728 |
73728 | |
| 18 | BUFFER SORT | | 0 | | 0 |00:00:00.01 | 0 | 73728 |
73728 | |
| 19 | PX RECEIVE | | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
| 20 | PX SEND BROADCAST | :TQ10001 | 0 | 21 | 0 |00:00:00.01 | 0 | |
| |
|* 21 | TABLE ACCESS BY INDEX ROWID| STOCK | 1 | 21 | 83 |00:00:00.01 | 78 | |
| |
|* 22 | INDEX RANGE SCAN | STOCK_PK | 1 | 91 | 83 |00:00:00.01 | 4 | |
| |
|* 23 | TABLE ACCESS BY INDEX ROWID | MV_TRANS_STOCK | 0 | 1 | 0 |00:00:00.01 | 0 | |
| |
|* 24 | INDEX RANGE SCAN | MV_TRANS_STOCK_IDX1 | 0 | 1 | 0 |00:00:00.01 | 0 | |
| |
Predicate Information (identified by operation id):
14 - access("P"."PRODUCT"=:PPRODUCT)
16 - access(:Z>=:Z AND :Z<=:Z)
filter("CON"."PRODUCT"=:PPRODUCT)
21 - filter("STOCK"."LOC_CODE"=:PLOCCODE)
22 - access("STOCK"."PRODUCT"=:PPRODUCT AND "STOCK"."WH_CODE"=:PWHCODE)
23 - filter("STS"='N')
24 - access("PRODUCT"=:PPRODUCT AND "WH_CODE"=:PWHCODE AND "LOC_CODE"=:PLOCCODE AND "RACK"="STOCK"."RACK" AND "BATCH"="STOCK"."B
ATCH" AND
"EXP_DATE"="STOCK"."EXP_DATE")
53 rows selected.
Elapsed: 00:00:00:12I'm looking forward for suggestions how to improve the performance of this statement.
Thank you very much,
xtantoxtanto wrote:
Hi sir,
How to prevent the query from doing parallel query ?
Because as you see actually I am not issuing any Parallel hints in the query.
Thank you,
xtantoKristanto,
there are a couple of points to consider:
1. Your SQL*Plus version seems to be outdated. Please use a SQL*Plus version that corresponds to your database version. E.g. the AUTOTRACE output is odd.
2. I would suggest to repeat your exercise using serial execution (the plan, the autotrace, the tracing). You can disable parallel queries by issuing this in your session:
ALTER SESSION DISABLE PARALLEL QUERY;
This way the output of the tools is much more meaningful, however you might get a different execution plan, therefore the results might not be representative for your parallel execution.
3. The function calls might pose a problem. If they are, one possible damage limitation has been provided by hoek. Even better would be then to replace the PL/SQL function with equivalent plain SQL. However since you say that it generates not too many rows it might not harm here too much. You can check the impact of the functions by running a similar query but omitting the function calls.
4. The parallel execution plan contains a MERGE JOIN CARTESIAN operation which could be an issue if the estimates of the optimizer are incorrect. If the serial execution still uses this operation the TKPROF and DBMS_XPLAN.DISPLAY_CURSOR output will reveal whether this is a problem or not.
5. The execution of the statement seems to take on 2-3 seconds in your tests. Is this in the right ballpark? If yes, why should this statement then be problematic? How often does it get executed?
6. The statement uses bind variables, so you might have executions that use different execution plans depending on the bind values passed when the statement got optimized. You can use DBMS_XPLAN.DISPLAY_CURSOR using NULL as "child_number" parameter or DBMS_XPLAN.DISPLAY_AWR (if you have a AWR license) to check if you have multiple execution plans for the statement. Please note that older versions might have already been aged out of the shared pool, so the AWR repository might be a more reliable source (but only if the statement has been sampled).
7. You have disabled cost based transformations: "_optimizer_cost_based_transformation" = OFF. Why?
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Cannot connect to Enterprise Manager. Displays Enterprise Manager(null)
Hi All:
I have downloaded and installed VMware, Oracle 10g RAC and Red Hat Enterprise Linux 3 using Disk1 and Disk2.
All seemed fine. However I cannot log on to the Enterprise Manager nor start the listener nor any instance of the database
I got the error message below when I tried starting an instance of the Database. The Enterprise Manager displays "
Enterprise Manager(null) in the title bar of mozzila browser when I tried to start it.
[oracle@raclinux1 /]$ srvctl start instance -d o10G -i o10G1
PRKP-1001 : Error starting instance O10G1 on node raclinux1
raclinux1:ora.raclinux1.vip:Interface eth0 checked failed (host=raclinux1.us.oracle.com)
raclinux1:ora.raclinux1.vip:Invalid parameters, IP, NETMASK and IF all must be specified
raclinux1:ora.raclinux1.vip:checkIf: interface name is NULL
raclinux1:ora.raclinux1.vip:Interface eth0 checked failed (host=raclinux1.us.oracle.com)
raclinux1:ora.raclinux1.vip:Invalid parameters, IP, NETMASK and IF all must be specified
CRS-0215: Could not start resource ora.O10G.O10G1.inst.
Does anyone have any suggestions?
Thanks
1113777If you read the README you'll see that the recommended way is to not bother downloading VMware, just use OUI to install it, it will fix the subnet mask to 192.168.203.0. If you still choose to install on your own, please refer to the readme for details on how to manually fix it.
It is also safe to install VMware in this fashion even if you already have it installed, just to get the subnets correct. Without this step, as you can see, nothing works inside the VM. This is because we are using fixed IP addresses and the randomly chosen subnet number doesn't match what we expect.
good luck,
Saar.
Maybe you are looking for
-
Error while creating a system object for R3 in portal
Hi, I am getting error while trying to create a system object in portal. Following are the details I used : Under WAS... Web AS Host Name :<XXXX>:8001 Web AS path: /sap/bc/bsp/sap/ Web AS protocol : http Under User management: Authentication Ticket T
-
Matrix Program - First time using multiple classes
I'm writing a program right now that takes matrices from an input file specified by the user. The file is in this format. #rows #columns 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 So in place of #rows I would have a 3, and #columns would be a 6. They are se
-
Hi, I have a seagate drive that is formated to Mac OS Extended (Journaled), then I copied some files to it from a different drive, now I am having an issue that if I created a folder it will be named as untitled folder so when I try to rename it, it
-
HT5132 How do I get rid of the box showing up ......
How do I get rid of the box showing up all the time when I start the computer and plug in my iPhone its highly annoying. Tried everything at this stage only for it to pop up again the next time
-
Posting incoming payment ismore than the net due
Dear Experts, How can we do the transactions where in the customer incoming payment is more than the net due. with regards Ramesh Y