SQL Tunning
I am having one batch job in which query fatching data from various tables and inserting in one table.
It's taking 3-4 hours. On generating explain plan i come to know that query taking more time due to one outer join between one view(say V1) and large table(say T1).
V1.Column(+) =T1.Column1 || '-' || T1.Column2
If i remove this outer join it will improve but according to need i can't do it.
It's oracle8i and its using rule based only
I am planning to create 2 Indexed. 1 on T1.Column1 and other T1.Column2. or any other suggestion from you guys.
It's very urgent i need to do it in 2 days. Please any one help me out
Thanks in advance
Chetan
ChetanS wrote:
This is my tkprof result
call count cpu elapsed disk query current rows
Parse 1 12.24 12.26 0 0 2 0
Execute 1 0.01 0.02 0 3 9 0
Fetch 438 48.54 153.05 43263 917910 241 438000
total 440 60.79 165.33 43263 917913 252 438000
See below explain plan
you find more cost due to above joinI'm not sure how to interpret your posts. A few comments:
1. You said you're using 8i with rule based optimization. But now you're talking about cost and the plan shows a cost, too. So it looks more like a CBO plan.
2. If you say that "If i remove this outer join it will improve but according to need i can't do it.", what do you mean exactly?
- Turn the the outer join into an inner join?
- Remove the join clause completely?
And what do you mean by "it will improve"? Does it perform better, or do you get simply a lower cost returned by EXPLAIN PLAN?
3. The plan looks convoluted. There are REMOTE objects involved and the DUAL table is referenced multiple times, so it might a very good idea to share the actual query code used. If required, mask the table/view names and replace them with "table1/2/3" etc.
Note that the optimizer often does a suboptimal job when REMOTE objects are involved, so may be this is one of the root causes of your performance issues.
4. Use the \ tag before and after text that should be formatted in fixed font for better readability. Use the "Quote" button in the message editor to see how I did it here.
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/
Similar Messages
-
Differece b/w SQL Tunning & SQL Access advisor
What the difference b/w these 2 , i know SQL Access advisor suggest for index or materialize view for fast query....what SQL tunning do?
Mithu,
Please stop lying!!!
You are not new in this field. You have been asking RTFM questions for almost three years!!! When I had three years experience, I didn't need to ask the questions you think you need to ask. I LOOKED THEM UP IN THE DOCUMENTATION!!
I will continue to expose your attitude as abysmal.
You are in flagrant violation of the Etiquette in this forum.
You are a parasite. You don't want to do anything to resolve your own questions.
You are a disgrace to the DBA profession.
In fact, because of this I may want to have your account removed.
Sybrand Bakker
Senior Oracle DBA -
HI
I have query sql tunning.
SQL> explain plan set statement_id='TEST' for
2 select * from employee where emp_id=7369;
Explained.
but to how to view this explained.That is a good explanation provided by hoek, in this case the Predicate Information section does provide a clue that the optimizer rewote the SQL statement that you provided into an equivalent form. That section of the execution plan indicates how the data will be retrieved and compared. The number to the left should be matched with the corresponding ID value in the execution plan.
I do not have your test table, so I created one in 10.2.0.4 and 11.1.0.7, then built an equivalent query. Creating the test table and gathering statistics:
SET LINESIZE 140
SET TRIMSPOOL ON
SET PAGESIZE 1000
CREATE TABLE T1(
EMPLOYEE_ID VARCHAR2(30),
EMPLOYEE_NAME VARCHAR2(80),
DEPT_ID VARCHAR2(15),
SALARY NUMBER,
PRIMARY KEY(EMPLOYEE_ID));
INSERT INTO
T1
SELECT
CHR(MOD(ROWNUM-1,26)+65)||TO_CHAR(ROWNUM),
RPAD(CHR(MOD(ROWNUM-1,26)+65),40,CHR(MOD(ROWNUM-1,26)+65))||TO_CHAR(ROWNUM),
CHR(MOD(ROWNUM-1,10)+65),
ROUND(ABS(SIN(ROWNUM/180))*100000 + 10000,2)
FROM
DUAL
CONNECT BY
LEVEL<=1000;
COMMIT;
EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',CASCADE=>TRUE)Executing the query with a 10053 trace enabled so that we can see how the optimizer transforms the submitted SQL statement:
ALTER SESSION SET TRACEFILE_IDENTIFIER = '10053TraceTransform';
ALTER SESSION SET EVENTS '10053 TRACE NAME CONTEXT FOREVER, LEVEL 1';
SELECT /*+ FIND_ME */
DEPT_ID
FROM
T1
WHERE
SALARY > ALL(
SELECT
AVG(SALARY)
FROM
T1
GROUP BY
DEPT_ID);
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'TYPICAL'));On Oracle 10.2.0.4 the execution plan looked like this:
SQL_ID 0yyg2tkus5avd, child number 0
SELECT /*+ FIND_ME */ DEPT_ID FROM T1 WHERE SALARY > ALL(
SELECT AVG(SALARY) FROM T1 GROUP BY DEPT_ID)
Plan hash value: 3443957669
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 1561 (100)| |
|* 1 | FILTER | | | | | |
| 2 | TABLE ACCESS FULL | T1 | 1000 | 8000 | 2 (0)| 00:00:01 |
|* 3 | FILTER | | | | | |
| 4 | HASH GROUP BY | | 10 | 80 | 3 (34)| 00:00:01 |
| 5 | TABLE ACCESS FULL| T1 | 1000 | 8000 | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter( IS NULL)
3 - filter(LNNVL(AVG("SALARY")<:B1))On 11.1.0.7 the execution plan looked like this:
SQL_ID 0yyg2tkus5avd, child number 0
SELECT /*+ FIND_ME */ DEPT_ID FROM T1 WHERE SALARY > ALL(
SELECT AVG(SALARY) FROM T1 GROUP BY DEPT_ID)
Plan hash value: 1608688004
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 9 (100)| |
| 1 | MERGE JOIN ANTI NA | | 950 | 19950 | 9 (34)| 00:00:01 |
| 2 | SORT JOIN | | 1000 | 8000 | 4 (25)| 00:00:01 |
| 3 | TABLE ACCESS FULL | T1 | 1000 | 8000 | 3 (0)| 00:00:01 |
|* 4 | SORT UNIQUE | | 10 | 130 | 5 (40)| 00:00:01 |
| 5 | VIEW | VW_NSO_1 | 10 | 130 | 4 (25)| 00:00:01 |
| 6 | HASH GROUP BY | | 10 | 80 | 4 (25)| 00:00:01 |
| 7 | TABLE ACCESS FULL| T1 | 1000 | 8000 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
4 - access("SALARY"<="AVG(SALARY)")
filter("SALARY"<="AVG(SALARY)")On 11.1.0.7 we see a null aware antijoin. Let's take a peek inside the 10053 trace files to see the transformed SQL statements (slightly reformatted):
10.2.0.4:
******* UNPARSED QUERY IS *******
SELECT /*+ */
"SYS_ALIAS_1"."DEPT_ID" "DEPT_ID"
FROM
"TESTUSER"."T1" "SYS_ALIAS_1"
WHERE
NOT EXISTS (
SELECT /*+ */
0
FROM
"TESTUSER"."T1" "T1"
GROUP BY
"T1"."DEPT_ID"
HAVING
LNNVL(AVG("T1"."SALARY")<"SYS_ALIAS_1"."SALARY"))11.1.0.7:
Final query after transformations:******* UNPARSED QUERY IS *******
SELECT
"T1"."DEPT_ID" "DEPT_ID"
FROM
(SELECT
AVG("T1"."SALARY") "AVG(SALARY)"
FROM
"TESTUSER"."T1" "T1"
GROUP BY
"T1"."DEPT_ID") "VW_NSO_1",
"TESTUSER"."T1" "T1"
WHERE
"T1"."SALARY"<="VW_NSO_1"."AVG(SALARY)"Just out of curiosity, what is the purpose of your SQL statement (I can see what it is doing, but why are you doing it)?
Charles Hooper
Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
http://hoopercharles.wordpress.com/
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
HI all,
Is there any command line method in oracle 9i which suggest optimizations for a sql query like tunning advisor in 10g.
I want to know a command line method not the oracle management Server
Thanks
LbnHi Lbn;
AFAIK answer is no for 9i,
Please review:
Performance Tuning Using Advisors and Manageability Features: AWR, ASH, ADDM and Sql Tuning Advisor [ID 276103.1] << part Performance Tuning Approach: Pre-Oracle10g
Also review:
Tuning in Oracle7/8/8i/9i - Contents [ID 62325.1]
Regard
Helios -
Hi All , can you please suggest me , we have any tools in the market for oracle sql query tunning. and how those works?
ThanksThe Oracle database includes all of the tools required for its tuning.
There are some brilliant bells and whistles one can get with the Tuning Pack and permission to access AWR and ASH but for what you are considering they are not required.
Learn to use AUTOTRACE
http://www.psoug.org/reference/autotrace.html
EXPLAIN PLAN
http://www.psoug.org/reference/explain_plan.html
StatsPack and Tracing
http://www.psoug.org/reference/trace_tkprof.html#trtk
http://www.psoug.org/reference/dbms_monitor.html
http://www.psoug.org/reference/dbms_support.html
http://www.psoug.org/reference/dbms_trace.html
Oracle's docs on these are at http://tahiti.oracle.com -
Hi Guys, This sql is costing, is there any advice to tune it more efficient way???
SELECT COUNT(*)
FROM m_sys.m_list_pos lp,
m_sys.m_status s
WHERE lp.stat_id = s.stat_id
AND lp.proj_id = i_proj_id
AND lp.dp_id = r_dp.dp_id
AND lp.control_date BETWEEN
r_pivot_range.pivot_date_from AND
r_pivot_range.pivot_date_to
AND s.order_seq =
( SELECT MAX (s2.order_seq)
FROM m_sys.m_list_pos lp2, m_sys.m_status s2
WHERE lp2.stat_id = s2.stat_id
AND lp.dp_id = lp2.dp_id
AND lp.proj_id = lp2.proj_id
AND lp2.ln_id = lp.ln_id
AND lp2.lp_pos = lp.lp_pos );
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
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
db_file_multiblock_read_count integer 16
db_block_size integer 8192
cursor_sharing string EXACT
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 02-01-2007 01:49
SYSSTATS_INFO DSTOP 02-01-2007 01:49
SYSSTATS_INFO FLAGS 1
SYSSTATS_MAIN CPUSPEEDNW 1303.90873
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
SQL> explain plan for
2 SELECT NVL(COUNT(*),0) as ret_count
3 -- INTO ret_count
4 FROM m_sys.m_list_pos lp,
5 m_sys.m_status s
6 WHERE lp.stat_id = s.stat_id
7 AND lp.proj_id ='H336073'-- i_proj_id
8 -- AND lp.dp_id = r_dp.dp_id
9 AND lp.control_date BETWEEN '26/NOV/2010' and '27/DEC/2010'
10 -- r_pivot_range.pivot_date_from AND r_pivot_range.pivot_date_to
11 AND s.order_seq =
12 ( SELECT MAX (s2.order_seq)
13 FROM m_sys.m_list_pos lp2, m_sys.m_status s2
14 WHERE lp2.stat_id = s2.stat_id
15 AND lp.dp_id = lp2.dp_id
16 AND lp.proj_id = lp2.proj_id
17 AND lp2.ln_id = lp.ln_id
18 AND lp2.lp_pos = lp.lp_pos );
Explained.
Elapsed: 00:00:00.25
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 237702927
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | | 425 (1)| 00:00:06 |
| 1 | SORT AGGREGATE | | 1 | | | |
| 2 | VIEW | | 1 | | 425 (1)| 00:00:06 |
|* 3 | FILTER | | | | | |
| 4 | HASH GROUP BY | | 1 | 137 | 425 (1)| 00:00:06 |
|* 5 | HASH JOIN | | 4 | 548 | 424 (1)| 00:00:06 |
|* 6 | HASH JOIN | | 4 | 468 | 421 (1)| 00:00:06 |
|* 7 | HASH JOIN | | 4 | 436 | 417 (1)| 00:00:06 |
|* 8 | TABLE ACCESS BY INDEX ROWID| M_LIST_POS | 410 | 22140 | 208 (0)| 00:00:03 |
|* 9 | INDEX RANGE SCAN | LP_PROJ_FK_I | 6774 | | 29 (0)| 00:00:01 |
| 10 | TABLE ACCESS BY INDEX ROWID| M_LIST_POS | 6774 | 363K| 208 (0)| 00:00:03 |
|* 11 | INDEX RANGE SCAN | LP_PROJ_FK_I | 6774 | | 29 (0)| 00:00:01 |
| 12 | TABLE ACCESS FULL | M_STATUS | 376 | 3008 | 3 (0)| 00:00:01 |
| 13 | TABLE ACCESS FULL | M_STATUS | 376 | 7520 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
3 - filter("S"."ORDER_SEQ"=MAX("S2"."ORDER_SEQ"))
5 - access("LP"."STAT_ID"="S"."STAT_ID")
6 - access("LP2"."STAT_ID"="S2"."STAT_ID")
7 - access("LP"."DP_ID"="LP2"."DP_ID" AND "LP"."PROJ_ID"="LP2"."PROJ_ID" AND
"LP2"."LN_ID"="LP"."LN_ID" AND "LP2"."LP_POS"="LP"."LP_POS")
8 - filter("LP"."CONTROL_DATE">=TO_DATE('2010-11-26 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
AND "LP"."CONTROL_DATE"<=TO_DATE('2010-12-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss'))
9 - access("LP"."PROJ_ID"='H336073')
11 - access("LP2"."PROJ_ID"='H336073')
33 rows selected.
Elapsed: 00:00:00.92
1 select /*+ gather_plan_statistics */
2 NVL(COUNT(*),0) as ret_count
3 -- INTO ret_count
4 FROM m_sys.m_list_pos lp,
5 m_sys.m_status s
6 WHERE lp.stat_id = s.stat_id
7 AND lp.proj_id ='H336073'-- i_proj_id
8 -- AND lp.dp_id = r_dp.dp_id
9 AND lp.control_date BETWEEN '26/NOV/2010' and '27/DEC/2010'
10 -- r_pivot_range.pivot_date_from AND r_pivot_range.pivot_date_to
11 AND s.order_seq =
12 ( SELECT MAX (s2.order_seq)
13 FROM m_sys.m_list_pos lp2, m_sys.m_status s2
14 WHERE lp2.stat_id = s2.stat_id
15 AND lp.dp_id = lp2.dp_id
16 AND lp.proj_id = lp2.proj_id
17 AND lp2.ln_id = lp.ln_id
18* AND lp2.lp_pos = lp.lp_pos )
SQL> /
RET_COUNT
1
Elapsed: 00:00:00.78
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID 5z5zd7ju20zx0, child number 0
select /*+ gather_plan_statistics */ NVL(COUNT(*),0) as ret_count -- INTO ret_count FROM m_sys
m_sys.m_status s WHERE lp.stat_id = s.stat_id AND lp.proj_id ='H336073'-- i_proj_id -- AND
lp.dp_id = r_dp.dp_id AND lp.control_date BETWEEN '26/NOV/2010' and '27/DEC/2010' -- r_piv
AND r_pivot_range.pivot_date_to AND s.order_seq = ( SELECT MAX (s2.order_seq)
FROM m_sys.m_list_pos lp2, m_sys.m_status s2 WHERE lp2.stat_id = s2.stat_id AND lp.dp_id
lp2.dp_id AND lp.proj_id = lp2.proj_id AND lp2.ln_id = lp.ln_id AND
lp2.lp_pos = lp.lp_pos )
Plan hash value: 237702927
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads | OMem | 1
| 1 | SORT AGGREGATE | | 1 | 1 | 1 |00:00:00.31 | 506 | 14 | | |
| 2 | VIEW | | 1 | 1 | 1 |00:00:00.31 | 506 | 14 | | |
|* 3 | FILTER | | 1 | | 1 |00:00:00.31 | 506 | 14 | | |
| 4 | HASH GROUP BY | | 1 | 1 | 181 |00:00:00.31 | 506 | 14 | | |
|* 5 | HASH JOIN | | 1 | 4 | 371 |00:00:00.31 | 506 | 14 | 736K| 736K| 412K (0
|* 6 | HASH JOIN | | 1 | 4 | 371 |00:00:00.30 | 499 | 14 | 735K| 735K| 682K (
|* 7 | HASH JOIN | | 1 | 4 | 371 |00:00:00.30 | 492 | 14 | 771K| 771K| 1162K
|* 8 | TABLE ACCESS BY INDEX ROWID| M_LIST_POS | 1 | 410 | 181 |00:00:00.19 | 246 | 14 |
|* 9 | INDEX RANGE SCAN | LP_PROJ_FK_I | 1 | 6774 | 6635 |00:00:00.01 | 29 | 0 | |
| 10 | TABLE ACCESS BY INDEX ROWID| M_LIST_POS | 1 | 6774 | 6635 |00:00:00.01 | 246 | 0 |
|* 11 | INDEX RANGE SCAN | LP_PROJ_FK_I | 1 | 6774 | 6635 |00:00:00.01 | 29 | 0 | |
| 12 | TABLE ACCESS FULL | M_STATUS | 1 | 376 | 376 |00:00:00.01 | 7 | 0 |
| 13 | TABLE ACCESS FULL | M_STATUS | 1 | 376 | 376 |00:00:00.01 | 7 | 0 |
Predicate Information (identified by operation id):
3 - filter("S"."ORDER_SEQ"=MAX("S2"."ORDER_SEQ"))
5 - access("LP"."STAT_ID"="S"."STAT_ID")
6 - access("LP2"."STAT_ID"="S2"."STAT_ID")
7 - access("LP"."DP_ID"="LP2"."DP_ID" AND "LP"."PROJ_ID"="LP2"."PROJ_ID" AND "LP2"."LN_ID"="LP"."
"LP2"."LP_POS"="LP"."LP_POS")
8 - filter(("LP"."CONTROL_DATE">=TO_DATE('2010-11-26 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND "LP"
00:00:00', 'yyyy-mm-dd hh24:mi:ss')))
9 - access("LP"."PROJ_ID"='H336073')
11 - access("LP2"."PROJ_ID"='H336073')
43 rows selected.
Elapsed: 00:00:00.93
SQL>
{code}
Thank,
Edited by: HarshaJ on May 9, 2011 12:49 PM
Edited by: HarshaJ on May 10, 2011 10:31 AMMay be this?
SELECT COUNT (*)
FROM (SELECT MAX (s.order_sq)
FROM m_sys.m_list_pos lp, m_sys.m_status s
WHERE lp.stat_id = s.stat_id
AND lp.proj_id = i_proj_id
AND lp.dp_id = r_dp.dp_id
AND lp.control_date BETWEEN r_pivot_range.pivot_date_from AND r_pivot_range.pivot_date_to
GROUP BY lp.proj_id,
lp.ln_id,
lp.lp_pos)G. -
SQL tune (High response time)
Hi,
I am writing the following function which is causing high response time. Can you please help? Please SBMS_SQLTUNE advise.
GENERAL INFORMATION SECTION
Tuning Task Name : BFG_TUNING1
Tuning Task Owner : ARADMIN
Scope : COMPREHENSIVE
Time Limit(seconds) : 60
Completion Status : COMPLETED
Started at : 01/28/2013 15:48:39
Completed at : 01/28/2013 15:49:43
Number of SQL Restructure Findings: 7
Number of Errors : 1
Schema Name: ARADMIN
SQL ID : 2d61kbs9vpvp6
SQL Text : SELECT /*+no_merge(chg)*/ chg.CHANGE_REFERENCE,
chg.Customer_Name, chg.Customer_ID, chg.Contract_ID,
chg.Change_Title, chg.Change_Type, chg.Change_Description,
chg.Risk, chg.Impact, chg.Urgency, chg.Scheduled_Start_Date,
chg.Scheduled_End_Date, chg.Scheduled_Start_Date_Int,
chg.Scheduled_End_Date_Int, chg.Outage_Required,
chg.Change_Status, chg.Change_Status_IM, chg.Reason_for_change,
chg.Customer_Visible, chg.Change_Source,
chg.Related_Ticket_Type, chg.Related_Ticket_ID,
chg.Requested_By, chg.Requested_For, chg.Site_ID, chg.Site_Name,
chg.Element_id, chg.Element_Type, chg.Element_Name,
chg.Search_flag, chg.remedy_id, chg.Change_Manager,
chg.Email_Manager, chg.Queue, a.customer as CUSTOMER_IM,
a.contract as CONTRACT_IM, a.cid FROM exp_cm_cusid1 a, (sELECT *
FROM EXP_BFG_CM_JOIN_V WHERE CUSTOMER_ID = 14187) chg WHERE
a.bfg_con_id IS NULL AND a.bfg_cus_id = chg.customer_id AND
NOT EXISTS (SELECT a.bfg_con_id FROM exp_cm_cusid1 a WHERE
a.bfg_con_id IS NOT NULL AND a.bfg_cus_id = chg.customer_id
AND a.bfg_con_id = chg.contract_id ) UNION SELECT
/*+no_marge(chg)*/ chg.CHANGE_REFERENCE, chg.Customer_Name,
chg.Customer_ID, chg.Contract_ID, chg.Change_Title,
chg.Change_Type, chg.Change_Description, chg.Risk, chg.Impact,
chg.Urgency, chg.Scheduled_Start_Date, chg.Scheduled_End_Date,
chg.Scheduled_Start_Date_Int, chg.Scheduled_End_Date_Int,
chg.Outage_Required, chg.Change_Status, chg.Change_Status_IM,
chg.Reason_for_change, chg.Customer_Visible, chg.Change_Source,
chg.Related_Ticket_Type, chg.Related_Ticket_ID,
chg.Requested_By, chg.Requested_For, chg.Site_ID, chg.Site_Name,
chg.Element_id, chg.Element_Type, chg.Element_Name,
chg.Search_flag, chg.remedy_id, chg.Change_Manager,
chg.Email_Manager, chg.Queue, a.customer as CUSTOMER_IM,
a.contract as CONTRACT_IM, a.cid FROM exp_cm_cusid1 a, (sELECT *
FROM EXP_BFG_CM_JOIN_V WHERE CUSTOMER_ID = 14187) chg WHERE
a.bfg_cus_id = chg.customer_id AND a.bfg_con_id =
chg.contract_id AND a.bfg_con_id IS NOT NULL
FINDINGS SECTION (7 findings)
1- Restructure SQL finding (see plan 1 in explain plans section)
The predicate REGEXP_LIKE ("T100"."C536871160",'^[[:digit:]]+$') used at
line ID 26 of the execution plan contains an expression on indexed column
"C536871160". This expression prevents the optimizer from selecting indices
on table "ARADMIN"."T100".
Recommendation
- Rewrite the predicate into an equivalent form to take advantage of
indices. Alternatively, create a function-based index on the expression.
Rationale
The optimizer is unable to use an index if the predicate is an inequality
condition or if there is an expression or an implicit data type conversion
on the indexed column.
2- Restructure SQL finding (see plan 1 in explain plans section)
The predicate TO_NUMBER(TRIM("T100"."C536871160"))=:B1 used at line ID 26 of
the execution plan contains an expression on indexed column "C536871160".
This expression prevents the optimizer from selecting indices on table
"ARADMIN"."T100".
Recommendation
- Rewrite the predicate into an equivalent form to take advantage of
indices. Alternatively, create a function-based index on the expression.
Rationale
The optimizer is unable to use an index if the predicate is an inequality
condition or if there is an expression or an implicit data type conversion
on the indexed column.
3- Restructure SQL finding (see plan 1 in explain plans section)
The predicate REGEXP_LIKE ("T100"."C536871160",'^[[:digit:]]+$') used at
line ID 10 of the execution plan contains an expression on indexed column
"C536871160". This expression prevents the optimizer from selecting indices
on table "ARADMIN"."T100".
Recommendation
- Rewrite the predicate into an equivalent form to take advantage of
indices. Alternatively, create a function-based index on the expression.
Rationale
The optimizer is unable to use an index if the predicate is an inequality
condition or if there is an expression or an implicit data type conversion
on the indexed column.
4- Restructure SQL finding (see plan 1 in explain plans section)
The predicate TO_NUMBER(TRIM("T100"."C536871160"))=:B1 used at line ID 10 of
the execution plan contains an expression on indexed column "C536871160".
This expression prevents the optimizer from selecting indices on table
"ARADMIN"."T100".
Recommendation
- Rewrite the predicate into an equivalent form to take advantage of
indices. Alternatively, create a function-based index on the expression.
Rationale
The optimizer is unable to use an index if the predicate is an inequality
condition or if there is an expression or an implicit data type conversion
on the indexed column.
5- Restructure SQL finding (see plan 1 in explain plans section)
The predicate REGEXP_LIKE ("T100"."C536871160",'^[[:digit:]]+$') used at
line ID 6 of the execution plan contains an expression on indexed column
"C536871160". This expression prevents the optimizer from selecting indices
on table "ARADMIN"."T100".
Recommendation
- Rewrite the predicate into an equivalent form to take advantage of
indices. Alternatively, create a function-based index on the expression.
Rationale
The optimizer is unable to use an index if the predicate is an inequality
condition or if there is an expression or an implicit data type conversion
on the indexed column.
6- Restructure SQL finding (see plan 1 in explain plans section)
The predicate TO_NUMBER(TRIM("T100"."C536871160"))=:B1 used at line ID 6 of
the execution plan contains an expression on indexed column "C536871160".
This expression prevents the optimizer from selecting indices on table
"ARADMIN"."T100".
Recommendation
- Rewrite the predicate into an equivalent form to take advantage of
indices. Alternatively, create a function-based index on the expression.
Rationale
The optimizer is unable to use an index if the predicate is an inequality
condition or if there is an expression or an implicit data type conversion
on the indexed column.
7- Restructure SQL finding (see plan 1 in explain plans section)
An expensive "UNION" operation was found at line ID 1 of the execution plan.
Recommendation
- Consider using "UNION ALL" instead of "UNION", if duplicates are allowed
or uniqueness is guaranteed.
Rationale
"UNION" is an expensive and blocking operation because it requires
elimination of duplicate rows. "UNION ALL" is a cheaper alternative,
assuming that duplicates are allowed or uniqueness is guaranteed.
ERRORS SECTION
- The current operation was interrupted because it timed out.
EXPLAIN PLANS SECTION
1- Original
Plan hash value: 1047651452
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
| 0 | SELECT STATEMENT | | 2 | 28290 | 567 (37)| 00:00:07 | | |
| 1 | SORT UNIQUE | | 2 | 28290 | 567 (37)| 00:00:07 | | |
| 2 | UNION-ALL | | | | | | | |
|* 3 | HASH JOIN RIGHT ANTI | | 1 | 14158 | 373 (5)| 00:00:05 | | |
| 4 | VIEW | VW_SQ_1 | 1 | 26 | 179 (3)| 00:00:03 | | |
| 5 | NESTED LOOPS | | 1 | 37 | 179 (3)| 00:00:03 | | |
|* 6 | TABLE ACCESS FULL | T100 | 1 | 28 | 178 (3)| 00:00:03 | | |
|* 7 | INDEX RANGE SCAN | I1451_536870913_1 | 1 | 9 | 1 (0)| 00:00:01 | | |
| 8 | NESTED LOOPS | | 1 | 14132 | 193 (5)| 00:00:03 | | |
|* 9 | HASH JOIN | | 1 | 14085 | 192 (5)| 00:00:03 | | |
|* 10 | TABLE ACCESS FULL | T100 | 1 | 28 | 178 (3)| 00:00:03 | | |
| 11 | VIEW | EXP_BFG_CM_JOIN_V | 3 | 42171 | 13 (24)| 00:00:01 | | |
| 12 | UNION-ALL | | | | | | | |
|* 13 | HASH JOIN | | 1 | 6389 | 5 (20)| 00:00:01 | | |
| 14 | REMOTE | PROP_CHANGE_REQUEST_V | 1 | 5979 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 15 | REMOTE | PROP_CHANGE_INVENTORY_V | 1 | 410 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 16 | HASH UNIQUE | | 1 | 6052 | 6 (34)| 00:00:01 | | |
|* 17 | HASH JOIN | | 1 | 6052 | 5 (20)| 00:00:01 | | |
| 18 | REMOTE | PROP_CHANGE_REQUEST_V | 1 | 5979 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 19 | REMOTE | PROP_CHANGE_INVENTORY_V | 1 | 73 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 20 | HASH UNIQUE | | 1 | 5979 | 3 (34)| 00:00:01 | | |
| 21 | REMOTE | PROP_CHANGE_REQUEST_V | 1 | 5979 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 22 | TABLE ACCESS BY INDEX ROWID| T1451 | 1 | 47 | 1 (0)| 00:00:01 | | |
|* 23 | INDEX RANGE SCAN | I1451_536870913_1 | 1 | | 1 (0)| 00:00:01 | | |
| 24 | NESTED LOOPS | | 1 | 14132 | 193 (5)| 00:00:03 | | |
|* 25 | HASH JOIN | | 1 | 14085 | 192 (5)| 00:00:03 | | |
|* 26 | TABLE ACCESS FULL | T100 | 1 | 28 | 178 (3)| 00:00:03 | | |
| 27 | VIEW | EXP_BFG_CM_JOIN_V | 3 | 42171 | 13 (24)| 00:00:01 | | |
| 28 | UNION-ALL | | | | | | | |
|* 29 | HASH JOIN | | 1 | 6389 | 5 (20)| 00:00:01 | | |
| 30 | REMOTE | PROP_CHANGE_REQUEST_V | 1 | 5979 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 31 | REMOTE | PROP_CHANGE_INVENTORY_V | 1 | 410 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 32 | HASH UNIQUE | | 1 | 6052 | 6 (34)| 00:00:01 | | |
|* 33 | HASH JOIN | | 1 | 6052 | 5 (20)| 00:00:01 | | |
| 34 | REMOTE | PROP_CHANGE_REQUEST_V | 1 | 5979 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 35 | REMOTE | PROP_CHANGE_INVENTORY_V | 1 | 73 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 36 | HASH UNIQUE | | 1 | 5979 | 3 (34)| 00:00:01 | | |
| 37 | REMOTE | PROP_CHANGE_REQUEST_V | 1 | 5979 | 2 (0)| 00:00:01 | ARS_B~ | R->S |
| 38 | TABLE ACCESS BY INDEX ROWID | T1451 | 1 | 47 | 1 (0)| 00:00:01 | | |
|* 39 | INDEX RANGE SCAN | I1451_536870913_1 | 1 | | 1 (0)| 00:00:01 | | |
Predicate Information (identified by operation id):
3 - access("ITEM_0"="EXP_BFG_CM_JOIN_V"."CUSTOMER_ID" AND "ITEM_1"="EXP_BFG_CM_JOIN_V"."CONTRACT_ID")
6 - filter("C536871050" LIKE '%FMS%' AND REGEXP_LIKE ("C536871160",'^[[:digit:]]+$') AND ("C536871088" IS NULL
OR REGEXP_LIKE ("C536871088",'^[[:digit:]]+$')) AND TO_NUMBER(TRIM("C536871088")) IS NOT NULL AND
TO_NUMBER(TRIM("C536871160"))=:SYS_B_0 AND "C536871160" IS NOT NULL AND "C536871050" IS NOT NULL AND "C7"=0)
7 - access("C536870913"="C536870914")
9 - access("EXP_BFG_CM_JOIN_V"."CUSTOMER_ID"=TO_NUMBER(TRIM("C536871160")))
10 - filter("C536871050" LIKE '%FMS%' AND REGEXP_LIKE ("C536871160",'^[[:digit:]]+$') AND ("C536871088" IS NULL
OR REGEXP_LIKE ("C536871088",'^[[:digit:]]+$')) AND TO_NUMBER(TRIM("C536871088")) IS NULL AND
TO_NUMBER(TRIM("C536871160"))=:SYS_B_0 AND "C536871160" IS NOT NULL AND "C536871050" IS NOT NULL AND "C7"=0)
13 - access("CHG"."PRP_CHG_REFERENCE"="INV"."PRP_CHG_REFERENCE")
17 - access("CHG"."PRP_CHG_REFERENCE"="INV"."PRP_CHG_REFERENCE")
23 - access("C536870913"="C536870914")
25 - access("EXP_BFG_CM_JOIN_V"."CUSTOMER_ID"=TO_NUMBER(TRIM("C536871160")) AND
"EXP_BFG_CM_JOIN_V"."CONTRACT_ID"=TO_NUMBER(TRIM("C536871088")))
26 - filter("C536871050" LIKE '%FMS%' AND REGEXP_LIKE ("C536871160",'^[[:digit:]]+$') AND ("C536871088" IS NULL
OR REGEXP_LIKE ("C536871088",'^[[:digit:]]+$')) AND TO_NUMBER(TRIM("C536871088")) IS NOT NULL AND
TO_NUMBER(TRIM("C536871160"))=:SYS_B_1 AND "C536871160" IS NOT NULL AND "C536871050" IS NOT NULL AND "C7"=0)
29 - access("CHG"."PRP_CHG_REFERENCE"="INV"."PRP_CHG_REFERENCE")
33 - access("CHG"."PRP_CHG_REFERENCE"="INV"."PRP_CHG_REFERENCE")
39 - access("C536870913"="C536870914")
Remote SQL Information (identified by operation id):
14 - SELECT "PRP_CHG_REFERENCE","CUS_ID","CUS_NAME","CNT_BFG_ID","PRP_TITLE","PRP_CHG_TYPE","PRP_DESCRIPTION","PR
P_BTIGNITE_PRIORITY","PRP_CUSTOMER_PRIORITY","PRP_CHG_URGENCY","PRP_RESPONSE_REQUIRED_BY","PRP_REQUIRED_BY_DATE","P
RP_CHG_OUTAGE_FLAG","PRP_CHG_STATUS","PRP_CHG_FOR_REASON","PRP_CHG_CUSTOMER_VISIBILITY","PRP_CHG_SOURCE_SYSTEM","PR
P_RELATED_TICKET_TYPE","PRP_RELATED_TICKET_ID","CHANGE_INITIATOR","CHANGE_ORIGINATOR","CHANGE_MANAGER","QUEUE"
FROM "PROP_OWNER2"."PROP_CHANGE_REQUEST_V" "CHG" WHERE "CUS_ID"=:1 (accessing 'ARS_BFG_DBLINK.WORLD' )
15 - SELECT "PRP_CHG_REFERENCE","SIT_ID","SIT_NAME","ELEMENT_SUMMARY","PRODUCT_NAME" FROM
"PROP_OWNER2"."PROP_CHANGE_INVENTORY_V" "INV" (accessing 'ARS_BFG_DBLINK.WORLD' )
18 - SELECT "PRP_CHG_REFERENCE","CUS_ID","CUS_NAME","CNT_BFG_ID","PRP_TITLE","PRP_CHG_TYPE","PRP_DESCRIPTION","PR
P_BTIGNITE_PRIORITY","PRP_CUSTOMER_PRIORITY","PRP_CHG_URGENCY","PRP_RESPONSE_REQUIRED_BY","PRP_REQUIRED_BY_DATE","P
RP_CHG_OUTAGE_FLAG","PRP_CHG_STATUS","PRP_CHG_FOR_REASON","PRP_CHG_CUSTOMER_VISIBILITY","PRP_CHG_SOURCE_SYSTEM","PR
P_RELATED_TICKET_TYPE","PRP_RELATED_TICKET_ID","CHANGE_INITIATOR","CHANGE_ORIGINATOR","CHANGE_MANAGER","QUEUE"
FROM "PROP_OWNER2"."PROP_CHANGE_REQUEST_V" "CHG" WHERE "CUS_ID"=:1 (accessing 'ARS_BFG_DBLINK.WORLD' )
19 - SELECT "PRP_CHG_REFERENCE","SIT_ID","SIT_NAME" FROM "PROP_OWNER2"."PROP_CHANGE_INVENTORY_V" "INV"
(accessing 'ARS_BFG_DBLINK.WORLD' )
21 - SELECT "PRP_CHG_REFERENCE","CUS_ID","CUS_NAME","CNT_BFG_ID","PRP_TITLE","PRP_CHG_TYPE","PRP_DESCRIPTION","PR
P_BTIGNITE_PRIORITY","PRP_CUSTOMER_PRIORITY","PRP_CHG_URGENCY","PRP_RESPONSE_REQUIRED_BY","PRP_REQUIRED_BY_DATE","P
RP_CHG_OUTAGE_FLAG","PRP_CHG_STATUS","PRP_CHG_FOR_REASON","PRP_CHG_CUSTOMER_VISIBILITY","PRP_CHG_SOURCE_SYSTEM","PR
P_RELATED_TICKET_TYPE","PRP_RELATED_TICKET_ID","CHANGE_INITIATOR","CHANGE_ORIGINATOR","CHANGE_MANAGER","QUEUE"
FROM "PROP_OWNER2"."PROP_CHANGE_REQUEST_V" "CHG" WHERE "CUS_ID"=:1 (accessing 'ARS_BFG_DBLINK.WORLD' )
30 - SELECT "PRP_CHG_REFERENCE","CUS_ID","CUS_NAME","CNT_BFG_ID","PRP_TITLE","PRP_CHG_TYPE","PRP_DESCRIPTION","PR
P_BTIGNITE_PRIORITY","PRP_CUSTOMER_PRIORITY","PRP_CHG_URGENCY","PRP_RESPONSE_REQUIRED_BY","PRP_REQUIRED_BY_DATE","P
RP_CHG_OUTAGE_FLAG","PRP_CHG_STATUS","PRP_CHG_FOR_REASON","PRP_CHG_CUSTOMER_VISIBILITY","PRP_CHG_SOURCE_SYSTEM","PR
P_RELATED_TICKET_TYPE","PRP_RELATED_TICKET_ID","CHANGE_INITIATOR","CHANGE_ORIGINATOR","CHANGE_MANAGER","QUEUE"
FROM "PROP_OWNER2"."PROP_CHANGE_REQUEST_V" "CHG" WHERE "CUS_ID"=:1 (accessing 'ARS_BFG_DBLINK.WORLD' )
31 - SELECT "PRP_CHG_REFERENCE","SIT_ID","SIT_NAME","ELEMENT_SUMMARY","PRODUCT_NAME" FROM
"PROP_OWNER2"."PROP_CHANGE_INVENTORY_V" "INV" (accessing 'ARS_BFG_DBLINK.WORLD' )
34 - SELECT "PRP_CHG_REFERENCE","CUS_ID","CUS_NAME","CNT_BFG_ID","PRP_TITLE","PRP_CHG_TYPE","PRP_DESCRIPTION","PR
P_BTIGNITE_PRIORITY","PRP_CUSTOMER_PRIORITY","PRP_CHG_URGENCY","PRP_RESPONSE_REQUIRED_BY","PRP_REQUIRED_BY_DATE","P
RP_CHG_OUTAGE_FLAG","PRP_CHG_STATUS","PRP_CHG_FOR_REASON","PRP_CHG_CUSTOMER_VISIBILITY","PRP_CHG_SOURCE_SYSTEM","PR
P_RELATED_TICKET_TYPE","PRP_RELATED_TICKET_ID","CHANGE_INITIATOR","CHANGE_ORIGINATOR","CHANGE_MANAGER","QUEUE"
FROM "PROP_OWNER2"."PROP_CHANGE_REQUEST_V" "CHG" WHERE "CUS_ID"=:1 (accessing 'ARS_BFG_DBLINK.WORLD' )
35 - SELECT "PRP_CHG_REFERENCE","SIT_ID","SIT_NAME" FROM "PROP_OWNER2"."PROP_CHANGE_INVENTORY_V" "INV"
(accessing 'ARS_BFG_DBLINK.WORLD' )
37 - SELECT "PRP_CHG_REFERENCE","CUS_ID","CUS_NAME","CNT_BFG_ID","PRP_TITLE","PRP_CHG_TYPE","PRP_DESCRIPTION","PR
P_BTIGNITE_PRIORITY","PRP_CUSTOMER_PRIORITY","PRP_CHG_URGENCY","PRP_RESPONSE_REQUIRED_BY","PRP_REQUIRED_BY_DATE","P
RP_CHG_OUTAGE_FLAG","PRP_CHG_STATUS","PRP_CHG_FOR_REASON","PRP_CHG_CUSTOMER_VISIBILITY","PRP_CHG_SOURCE_SYSTEM","PR
P_RELATED_TICKET_TYPE","PRP_RELATED_TICKET_ID","CHANGE_INITIATOR","CHANGE_ORIGINATOR","CHANGE_MANAGER","QUEUE"
FROM "PROP_OWNER2"."PROP_CHANGE_REQUEST_V" "CHG" WHERE "CUS_ID"=:1 (accessing 'ARS_BFG_DBLINK.WORLD' )
-------------------------------------------------------------------------------Please review the following threads:
{message:id=9360002}
{message:id=9360003} -
Hi all,
DB- ORACLE 9.2.0.4
I am facing problem in one query it is taking more than one hour, so i have traced the query and aslo after 15 min i ahve to cancel the query....
select MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where mrh_doc_status=5 and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+) and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name));
63196 rows selected.
Elapsed: 00:15:10.07And the explan plan for the query is
SQL> select * from table(DBMS_XPLAN.display());
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost
|
| 0 | SELECT STATEMENT | | 2967 | 799K| | 150
6 |
| 1 | SORT ORDER BY | | 2967 | 799K| 1704K| 150
6 |
| 2 | NESTED LOOPS OUTER | | 2967 | 799K| | 138
3 |
| 3 | NESTED LOOPS OUTER | | 2967 | 744K| | 138
3 |
| 4 | HASH JOIN OUTER | | 2967 | 689K| | 138
3 |
| 5 | HASH JOIN OUTER | | 2967 | 637K| | 137
4 |
| 6 | TABLE ACCESS FULL| OM_MEM_REG_HEAD | 2967 | 585K| | 136
5 |
| 7 | TABLE ACCESS FULL| OM_COUNTRY | 678 | 12204 | |
3 |
| 8 | TABLE ACCESS FULL | OM_COUNTRY | 678 | 12204 | |
3 |
| 9 | INDEX UNIQUE SCAN | CITY_CODE_PK | 1 | 19 | |
|
| 10 | INDEX UNIQUE SCAN | CITY_CODE_PK | 1 | 19 | |
|
--------------------------------------------------------------------------------Tkprof Report
TKPROF: Release 9.2.0.4.0 - Production on Thu Aug 6 11:47:36 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Trace file: /u01/app/oracle/admin/icai/udump/icai_ora_16195.trc
Sort options: prsdsk exedsk fchdsk
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 MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where mrh_doc_status=5 and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+) and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name))
call count cpu elapsed disk query current rows
Parse 2 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 2 5.30 32.71 10615 368623 7 16
total 7 5.31 32.72 10615 368623 7 16
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 62
Rows Row Source Operation
16 SORT ORDER BY (cr=368623 r=10615 w=14576 time=32712633 us)
177199 NESTED LOOPS OUTER (cr=368623 r=10361 w=10170 time=22170155 us)
177199 NESTED LOOPS OUTER (cr=191422 r=10361 w=10170 time=21538665 us)
177199 HASH JOIN OUTER (cr=14222 r=10361 w=10170 time=20649137 us)
177199 HASH JOIN OUTER (cr=14206 r=5210 w=5040 time=9619390 us)
177199 TABLE ACCESS FULL OM_MEM_REG_HEAD (cr=14190 r=155 w=0 time=491000 us)
678 TABLE ACCESS FULL OM_COUNTRY (cr=16 r=0 w=0 time=378 us)
678 TABLE ACCESS FULL OM_COUNTRY (cr=16 r=6 w=0 time=22130 us)
177198 INDEX UNIQUE SCAN CITY_CODE_PK (cr=177200 r=0 w=0 time=518983 us)(object id 33611)
177199 INDEX UNIQUE SCAN CITY_CODE_PK (cr=177201 r=0 w=0 time=342868 us)(object id 33611)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net more data from client 1 0.00 0.00
SQL*Net message to client 3 0.00 0.00
direct path write 1052 0.00 0.00
db file sequential read 49 0.00 0.00
db file scattered read 41 0.01 0.02
direct path read 1055 0.00 0.00
SQL*Net message from client 2 139.65 139.75
SQL*Net more data to client 1 0.00 0.00
select default$
from
col$ where rowid=:1
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.00 0 2 0 1
total 3 0.00 0.00 0 2 0 1
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY USER ROWID COL$ (cr=1 r=0 w=0 time=14 us)
select condition
from
cdef$ where rowid=:1
call count cpu elapsed disk query current rows
Parse 7 0.00 0.00 0 0 0 0
Execute 7 0.00 0.00 0 0 0 0
Fetch 7 0.00 0.00 0 15 0 7
total 21 0.00 0.00 0 15 0 7
Misses in library cache during parse: 0
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY USER ROWID CDEF$ (cr=2 r=0 w=0 time=12 us)
select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,
o.dataobj#,o.flags
from
obj$ o where o.obj#=:1
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.00 0 3 0 1
total 3 0.00 0.00 0 3 0 1
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 1)
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 2 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 2 5.30 32.71 10615 368623 7 16
total 7 5.31 32.72 10615 368623 7 16
Misses in library cache during parse: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net more data from client 2 0.00 0.00
SQL*Net message to client 3 0.00 0.00
direct path write 1052 0.00 0.00
db file sequential read 49 0.00 0.00
db file scattered read 41 0.01 0.02
direct path read 1055 0.00 0.00
SQL*Net message from client 2 139.65 139.75
SQL*Net more data to client 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.00 0.00 0 0 0 0
Execute 9 0.00 0.00 0 0 0 0
Fetch 9 0.00 0.00 0 20 0 9
total 27 0.00 0.00 0 20 0 9
Misses in library cache during parse: 2
2 user SQL statements in session.
9 internal SQL statements in session.
11 SQL statements in session.
Trace file: /u01/app/oracle/admin/icai/udump/icai_ora_16195.trc
Trace file compatibility: 9.00.01
Sort options: prsdsk exedsk fchdsk
1 session in tracefile.
2 user SQL statements in trace file.
9 internal SQL statements in trace file.
11 SQL statements in trace file.
4 unique SQL statements in trace file.
2378 lines in trace file.please suggest me how to resolve this problem...And 10046 event
/u01/app/oracle/admin/ai/udump/ai_ora_16195.trc
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
ORACLE_HOME = /u01/app/oracle/product/9.2.0.4.0/db_1
System name: Linux
Node name: ai-oracle
Release: 2.6.16.21-0.8-bigsmp
Version: #1 SMP Mon Jul 3 18:25:39 UTC 2006
Machine: i686
Instance name: ai
Redo thread mounted by this instance: 1
Oracle process number: 49
Unix process pid: 16195, image: oracle@ai-oracle (TNS V1-V3)
*** 2009-08-06 11:44:03.255
*** SESSION ID:(336.2123) 2009-08-06 11:44:03.237
WAIT #1: nam='SQL*Net more data from client' ela= 317 p1=1413697536 p2=48 p3=0
=====================
PARSING IN CURSOR #2 len=40 dep=1 uid=0 oct=3 lid=0 tim=1220253167243103 hv=3360804353 ad='b4705130'
select default$ from col$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=254,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1220253167243098
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b783df20 bln=16 avl=16 flg=05
value=0000C04B.0005.0001
EXEC #2:c=0,e=251,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167243426
FETCH #2:c=0,e=25,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167243472
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=21 op='TABLE ACCESS BY USER ROWID COL$ (cr=1 r=0 w=0 time=14 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167243990 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=25,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167243987
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b787950c bln=16 avl=16 flg=05
value=0000980A.0022.0001
EXEC #2:c=0,e=56,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244103
FETCH #2:c=0,e=15,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244136
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=2 r=0 w=0 time=12 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244235 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244233
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b787950c bln=16 avl=16 flg=05
value=0000980A.001E.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244336
FETCH #2:c=0,e=8,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244361
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=5 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244447 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=13,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244444
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b787950c bln=16 avl=16 flg=05
value=0000980A.001F.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244546
FETCH #2:c=0,e=8,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244571
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=4 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244656 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244653
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b787950c bln=16 avl=16 flg=05
value=0000980A.0020.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244755
FETCH #2:c=0,e=8,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244779
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=5 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244864 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=13,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244862
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b787950c bln=16 avl=16 flg=05
value=0000980A.0021.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244977
FETCH #2:c=0,e=7,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167245001
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=4 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167245086 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=11,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245083
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b787950c bln=16 avl=16 flg=05
value=0000980A.0023.0001
EXEC #2:c=0,e=45,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245185
FETCH #2:c=0,e=7,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167245209
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=5 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167245299 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245296
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
bfp=b787950c bln=16 avl=16 flg=05
value=0000980A.0024.0001
EXEC #2:c=0,e=45,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245398
FETCH #2:c=0,e=7,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167245422
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=4 us)'
=====================
PARSING IN CURSOR #1 len=2036 dep=0 uid=62 oct=3 lid=62 tim=1220253167250626 hv=3672446138 ad='b1cb8350'
select MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where mrh_doc_status=5 and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+) and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name))
END OF STMT
PARSE #1:c=8001,e=8557,p=0,cr=17,cu=0,mis=1,r=0,dep=0,og=4,tim=1220253167250624
BINDS #1:
EXEC #1:c=0,e=54,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=1220253167250805
WAIT #1: nam='SQL*Net message to client' ela= 0 p1=1413697536 p2=1 p3=0
WAIT #1: nam='direct path write' ela= 10 p1=201 p2=119945 p3=15
WAIT #1: nam='direct path write' ela= 1 p1=201 p2=119960 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=119975 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=119990 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=120005 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=120020 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=120035 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=120050 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130441 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=130456 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130471 p3=15
WAIT #1: nam='db file sequential read' ela= 28 p1=3 p2=907029 p3=1
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=130486 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=130501 p3=15
WAIT #1: nam='db file sequential read' ela= 18 p1=3 p2=907149 p3=1
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=130516 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130531 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130546 p3=15
WAIT #1: nam='db file sequential read' ela= 18 p1=3 p2=907262 p3=1
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102665 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102680 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102695 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=102710 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102725 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102740 p3=15
WAIT #1: nam='db file sequential read' ela= 27 p1=3 p2=907546 p3=1
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102755 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=102770 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73865 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73880 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=73895 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=73910 p3=15
WAIT #1: nam='db file sequential read' ela= 13 p1=3 p2=907783 p3=1
WAIT #1: nam='direct path write' ela= 1 p1=201 p2=73925 p3=15
WAIT #1: nam='db file sequential read' ela= 12 p1=3 p2=907841 p3=1
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73940 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=73955 p3=15
WAIT #1: nam='db file scattered read' ela= 29 p1=3 p2=907932 p3=2
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73970 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130057 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=130072 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130087 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135689 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=135704 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=135719 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135734 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135749 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135764 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135779 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=135794 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=53897 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=53912 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=53927 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=89353 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=89368 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=89383 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=89398 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=89413 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=89428 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=89443 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=89458 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122121 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122136 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122151 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=122166 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=122181 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=122196 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=122211 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122226 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119433 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119448 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119463 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119478 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119493 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119508 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119523 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119538 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99849 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99864 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=99879 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99894 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99909 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99924 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=99939 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99954 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96137 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=96152 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96167 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96182 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96197 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96212 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96227 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96242 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=64905 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64920 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64935 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64950 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64965 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64980 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=64995 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=87365 p3=15
WAIT #1: nam='direct path write' ela= 10 p1=201 p2=81161 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=59190 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=59205 p3=15
WAIT #1: nam='direct path write' ela= 8 p1=201 p2=59220 p3=15
WAIT #1: nam='direct path write' ela= 6 p1=201 p2=59235 p3=15
WAIT #1: nam='direct path write' ela= 7 p1=201 p2=59250 p3=15
WAIT #1: nam='direct path write' ela= 7 p1=201 p2=57609 p3=15
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=57624 p3=15
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=57639 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=121640 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=132351 p3=10
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=93184 p3=9
FETCH #1:c=5304331,e=32712615,p=10615,cr=368623,cu=7,mis=0,r=1,dep=0,og=4,tim=1220253199963476
WAIT #1: nam='SQL*Net message from client' ela= 101608 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=114,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253200065410
WAIT #1: nam='SQL*Net more data to client' ela= 18 p1=1413697536 p2=2016 p3=0
*** 2009-08-06 11:46:59.874
WAIT #1: nam='SQL*Net message from client' ela= 139655890 p1=1413697536 p2=1 p3=0
STAT #1 id=1 cnt=16 pid=0 pos=1 obj=0 op='SORT ORDER BY (cr=368623 r=10615 w=14576 time=32712633 us)'
STAT #1 id=2 cnt=177199 pid=1 pos=1 obj=0 op='NESTED LOOPS OUTER (cr=368623 r=10361 w=10170 time=22170155 us)'
STAT #1 id=3 cnt=177199 pid=2 pos=1 obj=0 op='NESTED LOOPS OUTER (cr=191422 r=10361 w=10170 time=21538665 us)'
STAT #1 id=4 cnt=177199 pid=3 pos=1 obj=0 op='HASH JOIN OUTER (cr=14222 r=10361 w=10170 time=20649137 us)'
STAT #1 id=5 cnt=177199 pid=4 pos=1 obj=0 op='HASH JOIN OUTER (cr=14206 r=5210 w=5040 time=9619390 us)'
STAT #1 id=6 cnt=177199 pid=5 pos=1 obj=33957 op='TABLE ACCESS FULL OM_MEM_REG_HEAD (cr=14190 r=155 w=0 time=491000 us)'
=====================
PARSING IN CURSOR #2 len=116 dep=1 uid=0 oct=3 lid=0 tim=1220253339722039 hv=431456802 ad='aeeabc68'
select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,o.dataobj#,o.flags from obj$ o where o.obj#=:1
END OF STMT
PARSE #2:c=0,e=410,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1220253339722035
BINDS #2:
bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 oacflg=08 oacfl2=1 size=24 offset=0
bfp=b7880124 bln=22 avl=04 flg=05
value=33630
EXEC #2:c=0,e=277,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253339722401
FETCH #2:c=0,e=44,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253339722463
STAT #1 id=7 cnt=678 pid=5 pos=2 obj=33630 op='TABLE ACCESS FULL OM_COUNTRY (cr=16 r=0 w=0 time=378 us)'
STAT #1 id=8 cnt=678 pid=4 pos=2 obj=33630 op='TABLE ACCESS FULL OM_COUNTRY (cr=16 r=6 w=0 time=22130 us)'
STAT #1 id=9 cnt=177198 pid=3 pos=2 obj=33611 op='INDEX UNIQUE SCAN CITY_CODE_PK (cr=177200 r=0 w=0 time=518983 us)'
STAT #1 id=10 cnt=177199 pid=2 pos=2 obj=33611 op='INDEX UNIQUE SCAN CITY_CODE_PK (cr=177201 r=0 w=0 time=342868 us)'
UNMAP #1:c=4000,e=1670,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=1220253339724234
WAIT #1: nam='direct path read' ela= 6 p1=201 p2=79462 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=53928 p3=31
WAIT #1: nam='direct path read' ela= 0 p1=201 p2=79607 p3=18
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=121671 p3=31
WAIT #0: nam='SQL*Net more data from client' ela= 17 p1=1413697536 p2=48 p3=0
=====================
PARSING IN CURSOR #1 len=2036 dep=0 uid=62 oct=3 lid=62 tim=1220253339730964 hv=3672446138 ad='b1cb8350'
select MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where mrh_doc_status=5 and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+) and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name))
END OF STMT
PARSE #1:c=0,e=182,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=1220253339730960
BINDS #1:
EXEC #1:c=0,e=75,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=1220253339731194
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='direct path write' ela= 10 p1=201 p2=53129 p3=31
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=53160 p3=31
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=53191 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=53222 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=79369 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=79400 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=79431 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=79462 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84873 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84904 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84935 p3=31
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=84966 p3=31
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=84745 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=84776 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84807 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=84838 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=121609 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=121640 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=57190 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=119945 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=119976 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=120007 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=120038 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130441 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130472 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=130503 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=102502 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=133641 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=133672 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=133703 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=133734 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=71177 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=71208 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=71239 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=71270 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=81161 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=81192 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=81223 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=81254 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=82313 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=82344 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=82375 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=82406 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=128649 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=128680 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=128711 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=128742 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=143369 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=143400 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=143431 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=143462 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=130185 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=130216 p3=31
WAIT #1: nam='db file sequential read' ela= 29 p1=3 p2=874392 p3=1
*** 2009-08-06 11:48:03.440
WAIT #1: nam='direct path read' ela= 10 p1=201 p2=109608 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=96199 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=109577 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96168 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=103782 p3=31
WAIT #1: nam='direct path read' ela= 0 p1=201 p2=96137 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=103751 p3=31
WAIT #1: nam='direct path write' ela= 0 p1=201 p2=84962 p3=31
WAIT #1: nam='direct path write' ela= 0 p1=201 p2=84993 p3=8
WAIT #1: nam='direct path write' ela= 0 p1=201 p2=130313 p3=31
WAIT #1: nam='direct path write' ela= 1 p1=201 p2=130344 p3=23
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=84934 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=102537 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=76928 p3=9
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=74536 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=57215 p3=10
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=88280 p3=31
FETCH #1:c=5200325,e=62203320,p=11801,cr=368622,cu=7,mis=0,r=1,dep=0,og=4,tim=1220253401934572
WAIT #1: nam='SQL*Net message from client' ela= 83705 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=112,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402018576
WAIT #1: nam='SQL*Net more data to client' ela= 19 p1=1413697536 p2=2016 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 95759 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=79,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402114512
WAIT #1: nam='SQL*Net more data to client' ela= 14 p1=1413697536 p2=2001 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 109760 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=82,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402224471
WAIT #1: nam='SQL*Net message from client' ela= 80582 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=110,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402305271
WAIT #1: nam='SQL*Net message from client' ela= 511761 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=101,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402817262
WAIT #1: nam='SQL*Net more data to client' ela= 21 p1=1413697536 p2=2002 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 85214 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=107,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402902725
WAIT #1: nam='SQL*Net message from client' ela= 77195 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=96,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402980131
WAIT #1: nam='SQL*Net more data to client' ela= 37 p1=1413697536 p2=2001 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 134711 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net more data to client' ela= 18 p1=1413697536 p2=2009 p3=0
FETCH #1:c=0,e=145,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253403115153
WAIT #1: nam='SQL*Net message from client' ela= 101690 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net more data to client' ela= 13 p1=1413697536 p2=2001 p3=0
FETCH #1:c=0,e=123,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253403217025
WAIT #1: nam='SQL*Net message from client' ela= 102501 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=96,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253403319700
WAIT #1: nam='SQL*Net message from client' ela= 688951 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net more data to client' ela= 16 p1=1413697536 p2=2003 p3=0
FETCH #1:c=4001,e=141,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253404008907
WAIT #1: nam='SQL*Net message from client' ela= 375225 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=111,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253404384377 -
I am executing a query for which there is a system temp table is used, How could i tune for better execution?
Please see the execution plan below
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 25 | 2650 | 83 (2)| 00:00:01 |
|* 1 | COUNT STOPKEY | | | | | |
| 2 | NESTED LOOPS | | | | | |
| 3 | NESTED LOOPS | | 25 | 2650 | 83 (2)| 00:00:01 |
| 4 | NESTED LOOPS | | 25 | 1900 | 81 (2)| 00:00:01 |
| 5 | VIEW | | 603 | 28341 | 78 (2)| 00:00:01 |
| 6 | TEMP TABLE TRANSFORMATION | | | | | |
| 7 | LOAD AS SELECT | PRODUCTS | | | | |
| 8 | HASH UNIQUE | | 114 | 2736 | 1435 (2)| 00:00:18 |
|* 9 | HASH JOIN | | 114 | 2736 | 1434 (2)| 00:00:18 |
|* 10 | TABLE ACCESS FULL | CUSTOMERS | 65 | 780 | 865 (2)| 00:00:11 |
| 11 | TABLE ACCESS BY INDEX ROWID | ORDER_LINES | 252K| 2956K| 567 (1)| 00:00:07 |
|* 12 | INDEX RANGE SCAN | OL_O1 | 252K| | 85 (0)| 00:00:02 |
| 13 | SORT ORDER BY | | 603 | 81405 | 439 (3)| 00:00:06 |
| 14 | HASH GROUP BY | | 603 | 81405 | 439 (3)| 00:00:06 |
|* 15 | HASH JOIN RIGHT ANTI | | 603 | 81405 | 437 (2)| 00:00:06 |
| 16 | VIEW | | 114 | 912 | 2 (0)| 00:00:01 |
| 17 | TABLE ACCESS FULL | SYS_TEMP_0FD9D6B20_523F10 | 114 | 912 | 2 (0)| 00:00:01 |
|* 18 | HASH JOIN | | 604 | 76708 | 435 (2)| 00:00:06 |
| 19 | TABLE ACCESS BY INDEX ROWID | PRODUCTS | 411 | 8220 | 6 (0)| 00:00:01 |
|* 20 | INDEX RANGE SCAN | PR_U2 | 411 | | 1 (0)| 00:00:01 |
|* 21 | HASH JOIN | | 2177 | 227K| 428 (2)| 00:00:06 |
| 22 | NESTED LOOPS | | | | | |
| 23 | NESTED LOOPS | | 7348 | 423K| 325 (2)| 00:00:04 |
|* 24 | HASH JOIN | | 114 | 3078 | 176 (3)| 00:00:03 |
| 25 | VIEW | | 114 | 912 | 2 (0)| 00:00:01 |
| 26 | TABLE ACCESS FULL | SYS_TEMP_0FD9D6B20_523F10 | 114 | 912 | 2 (0)| 00:00:01 |
|* 27 | TABLE ACCESS FULL | CUSTOMER_CLUSTERS | 86315 | 1601K| 173 (2)| 00:00:03 |
|* 28 | INDEX RANGE SCAN | IDX_RULES_COMM_ANTE_PROB | 64 | | 1 (0)| 00:00:01 |
| 29 | TABLE ACCESS BY INDEX ROWID| RULES | 64 | 2048 | 1 (0)| 00:00:01 |
|* 30 | TABLE ACCESS FULL | CLUSTER_PRODUCTS | 18418 | 863K| 103 (1)| 00:00:02 |
| 31 | TABLE ACCESS BY INDEX ROWID | CUSTOMERS | 1 | 29 | 1 (0)| 00:00:01 |
|* 32 | INDEX UNIQUE SCAN | CU_PK | 1 | | 1 (0)| 00:00:01 |
|* 33 | INDEX UNIQUE SCAN | PR_PK | 1 | | 1 (0)| 00:00:01 |
| 34 | TABLE ACCESS BY INDEX ROWID | PRODUCTS | 1 | 30 | 1 (0)| 00:00:01 |
---------------------------------------------------------------------------------------------------------------------ID 17 and 26
17 | TABLE ACCESS FULL | SYS_TEMP_0FD9D6B20_523F10 | 114 | 912 | 2 (0)| 00:00:01 | -
Tunning resoult of an sql script
Hello,
i just ran a script via SQL tunning advisor and i was wondering if anyone could explain this suggestion to me:
The predicate "TMP"."ID_OZN" LIKE '%' used at line ID 11 of the
execution plan contains an expression on indexed column
"ID_OZN". This expression prevents the optimizer from
efficiently using indices on table "DIT"."TBL_ID_NUM".How could i revrite the script as sql tunning advizor suggesting?
script is kinda large but the part what is bothering is:
select
from tbl_id_num tmp
where TMP.ID_OZN LIKE '%';thank you!991540 wrote:
How could i revrite the script as sql tunning advizor suggesting?
script is kinda large but the part what is bothering is:
select
from tbl_id_num tmp
where TMP.ID_OZN LIKE '%';
Could you explain the purpose filter in this query?
It is simply same as
select
from tbl_id_num tmp
where id_ozn is not null; -
Hi,
How to tune SQL Queries ? Performance wise what precautions to take for writing the SQL queries ?
Regards,
KiranKiran Bathula wrote:
How to tune SQL Queries ?
Learn how the optimizer works.
Learn what it it capable of.
And then.
Just start. The only way to become a SQL tuner, is to just do it (and do it many many times). -
Oracle Performance tunning genral question
Hi,
Below is the list of Areas of Oracle db for which tunning activities are done. You are invited to comment to it weather this is complete list or need some addition or deletion. As I'm learning PT for Oracle now a days, therefore I want to expand my knowledge by sharing what I'm learning and what I need to learn.
So comment with Open hearts on it. Espically from experts and Gurus.
Here is the List
1-Planning for Performance, include Storage consideration( Weather it is SAN, NAS, DAS), Network planning and host OS planning with proper configuration for running Oracle.
2-Database desining (Not under-Normalized and not Over-Normalized with proper usage of Indexes, views and Stored Procedures)
3- Instance tunning (Memory structure + B.g Processes)
4- Session tunning.
5- Segment Space tunning.
6- SQL tunning.
This is what uptill what I've learned. If it needs addition kindly tell me what are these. Please also provide me links(good and precise one) for PT tutorials on web.Also note that I'm discussing this w.r.t Single instance non-rac db.
Looking for Good sugessions
Regards,
AbbasiHello,
This is the oracle course contents:
Contents
Preface
1 Introduction
Course Objectives 1-2
Organization 1-3
Agenda 1-4
What Is Not Included 1-6
Who Tunes? 1-7
What Does the DBA Tune? 1-8
How to Tune 1-10
Tuning Methodology 1-11
Effective Tuning Goals 1-13
General Tuning Session 1-15
Summary 1-17
2 Basic Tuning Tools
Objectives 2-2
Performance Tuning Diagnostics 2-3
Performance Tuning Tools 2-4
Tuning Objectives 2-5
Top Wait Events 2-6
DB Time 2-7
CPU and Wait Time Tuning Dimensions 2-8
Time Model: Overview 2-9
Time Model Statistics Hierarchy 2-10
Time Model Example 2-12
Dynamic Performance Views 2-13
Dynamic Performance Views: Usage Examples 2-14
Dynamic Performance Views: Considerations 2-15
Statistic Levels 2-16
Statistics and Wait Events 2-18
System Statistic Classes 2-19
Displaying Statistics 2-20
Displaying SGA Statistics 2-22
Wait Events 2-23
Using the V$EVENT_NAME View 2-24
Wait Classes 2-25
Displaying Wait Event Statistics 2-26
Oracle Internal & Oracle Academy Use Only
iv
Commonly Observed Wait Events 2-28
Using the V$SESSION_WAIT View 2-29
Precision of System Statistics 2-31
Using Features of the Packs 2-32
Accessing the Database Home Page 2-34
Enterprise Manager Performance Pages 2-35
Viewing the Alert Log 2-37
Using Alert Log Information as an Aid in Tuning 2-38
User Trace Files 2-40
Background Processes Trace Files 2-41
Summary 2-42
Practice 2 Overview: Using Basic Tools 2-43
3 Using Automatic Workload Repository
Objectives 3-2
Automatic Workload Repository: Overview 3-3
Automatic Workload Repository Data 3-4
Workload Repository 3-5
Database Control and AWR 3-6
AWR Snapshot Purging Policy 3-7
AWR Snapshot Settings 3-8
Manual AWR Snapshots 3-9
Managing Snapshots with PL/SQL 3-10
Generating AWR Reports in EM 3-11
Generating AWR Reports in SQL*Plus 3-12
Reading the AWR Report 3-13
Snapshots and Periods Comparisons 3-14
Compare Periods: Benefits 3-15
Compare Periods: Results 3-16
Compare Periods: Report 3-17
Compare Periods: Load Profile 3-18
Compare Periods: Top Events 3-19
Summary 3-20
Practice 3 Overview: Using AWR-Based Tools 3-21
4 Defining Problems
Objectives 4-2
Defining the Problem 4-3
Limit the Scope 4-4
Setting the Priority 4-5
Top Wait Events 4-6
Oracle Internal & Oracle Academy Use Only
v
Setting the Priority: Example 4-7
Top SQL Reports 4-8
Common Tuning Problems 4-9
Tuning Life Cycle Phases 4-11
Tuning During the Life Cycle 4-12
Application Design and Development 4-13
Testing: Database Configuration 4-14
Deployment 4-15
Production 4-16
Migration, Upgrade, and Environment Changes 4-17
ADDM Tuning Session 4-18
Performance Versus Business Requirements 4-19
Performance Tuning Resources 4-20
Filing a Performance Service Request 4-21
RDA Report 4-22
Monitoring and Tuning Tool: Overview 4-23
Summary 4-25
Practice 4 Overview: Identifying the Problem 4-26
5 Using Metrics and Alerts
Objectives 5-2
Metrics, Alerts, and Baselines 5-3
Limitation of Base Statistics 5-4
Typical Delta Tools 5-5
Oracle Database 11g Solution: Metrics 5-6
Benefits of Metrics 5-7
Viewing Metric History Information 5-8
Using EM to View Metric Details 5-9
Statistic Histograms 5-10
Histogram Views 5-11
Server-Generated Alerts 5-12
Database Control Usage Model 5-13
Setting Thresholds 5-14
Creating and Testing an Alert 5-15
Metric and Alert Views 5-16
View User-Defined SQL Metrics 5-17
Create User-Defined SQL Metrics 5-18
View User-Defined Host Metrics 5-19
Create User-Defined Host Metrics 5-20
Summary 5-21
Practice Overview 5: Working with Metrics 5-22
Oracle Internal & Oracle Academy Use Only
vi
6 Baselines
Objectives 6-2
Comparative Performance Analysis with AWR Baselines 6-3
Automatic Workload Repository Baselines 6-4
Moving Window Baseline 6-5
Baselines in Performance Page Settings 6-6
Baseline Templates 6-7
AWR Baselines 6-8
Creating AWR Baselines 6-9
Single AWR Baseline 6-10
Creating a Repeating Baseline Template 6-11
Managing Baselines with PL/SQL 6-12
Generating a Baseline Template for a Single Time Period 6-13
Creating a Repeating Baseline Template 6-14
Baseline Views 6-15
Performance Monitoring and Baselines 6-17
Defining Alert Thresholds Using a Static Baseline 6-19
Using EM to Quickly Configure Adaptive Thresholds 6-20
Changing Adaptive Threshold Settings 6-22
Summary 6-23
Practice 6: Overview Using AWR Baselines 6-24
7 Using AWR-Based Tools
Objectives 7-2
Automatic Maintenance Tasks 7-3
Maintenance Windows 7-4
Default Maintenance Plan 7-5
Automated Maintenance Task Priorities 7-6
Tuning Automatic Maintenance Tasks 7-7
ADDM Performance Monitoring 7-8
ADDM and Database Time 7-9
DBTime-Graph and ADDM Methodology 7-10
Top Performance Issues Detected 7-12
Database Control and ADDM Findings 7-13
ADDM Analysis Results 7-14
ADDM Recommendations 7-15
Database Control and ADDM Task 7-16
Changing ADDM Attributes 7-17
Retrieving ADDM Reports by Using SQL 7-18
Active Session History: Overview 7-19
Active Session History: Mechanics 7-20
Oracle Internal & Oracle Academy Use Only
vii
ASH Sampling: Example 7-21
Accessing ASH Data 7-22
Dump ASH to File 7-23
Analyzing the ASH Data 7-24
Generating ASH Reports 7-25
ASH Report Script 7-26
ASH Report: General Section 7-27
ASH Report Structure 7-28
ASH Report: Activity Over Time 7-29
Summary 7-30
Practice 7 Overview: Using AWR-Based Tools 7-31
8 Monitoring an Application
Objectives 8-2
What Is a Service? 8-3
Service Attributes 8-4
Service Types 8-5
Creating Services 8-6
Managing Services in a Single-Instance Environment 8-7
Everything Switches to Services 8-8
Using Services with Client Applications 8-9
Using Services with the Resource Manager 8-10
Services and Resource Manager with EM 8-11
Services and the Resource Manager: Example 8-12
Using Services with the Scheduler 8-13
Services and the Scheduler with EM 8-14
Services and the Scheduler: Example 8-16
Using Services with Parallel Operations 8-17
Using Services with Metric Thresholds 8-18
Changing Service Thresholds by Using EM 8-19
Services and Metric Thresholds: Example 8-20
Service Aggregation and Tracing 8-21
Top Services Performance Page 8-22
Service Aggregation Configuration 8-23
Service Aggregation: Example 8-24
Client Identifier Aggregation and Tracing 8-25
trcsess Utility 8-26
Service Performance Views 8-27
Summary 8-29
Practice 8 Overview: Using Services 8-30
Oracle Internal & Oracle Academy Use Only
viii
9 Identifying Problem SQL Statements
Objectives 9-2
SQL Statement Processing Phases 9-3
Parse Phase 9-4
SQL Storage 9-5
Cursor Usage and Parsing 9-6
SQL Statement Processing Phases: Bind 9-8
SQL Statement Processing Phases: Execute and Fetch 9-9
Processing a DML Statement 9-10
COMMIT Processing 9-12
Role of the Oracle Optimizer 9-13
Identifying Bad SQL 9-15
TOP SQL Reports 9-16
What Is an Execution Plan? 9-17
Methods for Viewing Execution Plans 9-18
Uses of Execution Plans 9-19
DBMS_XPLAN Package: Overview 9-20
EXPLAIN PLAN Command 9-22
EXPLAIN PLAN Command: Example 9-23
EXPLAIN PLAN Command: Output 9-24
Reading an Execution Plan 9-25
Using the V$SQL_PLAN View 9-26
V$SQL_PLAN Columns 9-27
Querying V$SQL_PLAN 9-28
V$SQL_PLAN_STATISTICS View 9-29
Querying the AWR 9-30
SQL*Plus AUTOTRACE 9-32
Using SQL*Plus AUTOTRACE 9-33
SQL*Plus AUTOTRACE: Statistics 9-34
SQL Trace Facility 9-35
How to Use the SQL Trace Facility 9-37
Initialization Parameters 9-38
Enabling SQL Trace 9-40
Disabling SQL Trace 9-41
Formatting Your Trace Files 9-42
TKPROF Command Options 9-43
Output of the TKPROF Command 9-45
TKPROF Output with No Index: Example 9-50
TKPROF Output with Index: Example 9-51
Generate an Optimizer Trace 9-52
Oracle Internal & Oracle Academy Use Only
ix
Summary 9-53
Practice Overview 9: Using Execution Plan Utilities 9-54
10 Influencing the Optimizer
Objectives 10-2
Functions of the Query Optimizer 10-3
Selectivity 10-5
Cardinality and Cost 10-6
Changing Optimizer Behavior 10-7
Using Hints 10-8
Optimizer Statistics 10-9
Extended Statistics 10-10
Controlling the Behavior of the Optimizer with Parameters 10-11
Enabling Query Optimizer Features 10-13
Influencing the Optimizer Approach 10-14
Optimizing SQL Statements 10-15
Access Paths 10-16
Choosing an Access Path 10-17
Full Table Scans 10-18
Row ID Scans 10-20
Index Operations 10-21
B*Tree Index Operations 10-22
Bitmap Indexes 10-23
Bitmap Index Access 10-24
Combining Bitmaps 10-25
Bitmap Operations 10-26
Join Operations 10-27
Join Methods 10-28
Nested Loop Joins 10-29
Hash Joins 10-31
Sort-Merge Joins 10-32
Join Performance 10-34
How the Query Optimizer Chooses Execution Plans for Joins 10-35
Sort Operations 10-37
Tuning Sort Performance 10-38
Reducing the Cost 10-39
Index Maintenance 10-40
Dropping Indexes 10-42
Creating Indexes 10-43
SQL Access Advisor 10-44
Table Maintenance for Performance 10-45
Oracle Internal & Oracle Academy Use Only
x
Table Reorganization Methods 10-46
Summary 10-47
Practice 10 Overview: Influencing the Optimizer 10-48
11 Using SQL Performance Analyzer
Objectives 11-2
Real Application Testing: Overview 11-3
Real Application Testing: Use Cases 11-4
SQL Performance Analyzer: Process 11-5
Capturing the SQL Workload 11-7
Creating a SQL Performance Analyzer Task 11-8
SQL Performance Analyzer: Tasks 11-9
Optimizer Upgrade Simulation 11-10
SQL Performance Analyzer Task Page 11-11
Comparison Report 11-12
Comparison Report SQL Detail 11-13
Tuning Regressing Statements 11-14
Preventing Regressions 11-16
Parameter Change Analysis 11-17
Guided Workflow Analysis 11-18
SQL Performance Analyzer: PL/SQL Example 11-19
SQL Performance Analyzer: Data Dictionary Views 11-21
Summary 11-22
Practice 11: Overview 11-23
12 SQL Performance Management
Objectives 12-2
Maintaining SQL Performance 12-3
Maintaining Optimizer Statistics 12-4
Automated Maintenance Tasks 12-5
Statistic Gathering Options 12-6
Setting Statistic Preferences 12-7
Restore Statistics 12-9
Deferred Statistics Publishing: Overview 12-10
Deferred Statistics Publishing: Example 12-12
Automatic SQL Tuning: Overview 12-13
SQL Statement Profiling 12-14
Plan Tuning Flow and SQL Profile Creation 12-15
SQL Tuning Loop 12-16
Using SQL Profiles 12-17
SQL Tuning Advisor: Overview 12-18
Oracle Internal & Oracle Academy Use Only
xi
Using the SQL Tuning Advisor 12-19
SQL Tuning Advisor Options 12-20
SQL Tuning Advisor Recommendations 12-21
Using the SQL Tuning Advisor: Example 12-22
Using the SQL Access Advisor 12-23
View Recommendations 12-25
View Recommendation Details 12-26
SQL Plan Management: Overview 12-27
SQL Plan Baseline: Architecture 12-28
Loading SQL Plan Baselines 12-30
Evolving SQL Plan Baselines 12-31
Important Baseline SQL Plan Attributes 12-32
SQL Plan Selection 12-34
Possible SQL Plan Manageability Scenarios 12-36
SQL Performance Analyzer and SQL Plan Baseline Scenario 12-37
Loading a SQL Plan Baseline Automatically 12-38
Purging SQL Management Base Policy 12-39
Enterprise Manager and SQL Plan Baselines 12-40
Summary 12-41
Practice 12: Overview Using SQL Plan Management 12-42
13 Using Database Replay
Objectives 13-2
Using Database Replay 13-3
The Big Picture 13-4
System Architecture: Capture 13-5
System Architecture: Processing the Workload 13-7
System Architecture: Replay 13-8
Capture Considerations 13-9
Replay Considerations: Preparation 13-10
Replay Considerations 13-11
Replay Options 13-12
Replay Analysis 13-13
Database Replay Workflow in Enterprise Manager 13-15
Capturing Workload with Enterprise Manager 13-16
Capture Wizard: Plan Environment 13-17
Capture Wizard: Options 13-18
Capture Wizard: Parameters 13-19
Viewing Capture Progress 13-20
Viewing Capture Report 13-21
Export Capture AWR Data 13-22
Oracle Internal & Oracle Academy Use Only
xii
Viewing Workload Capture History 13-23
Processing Captured Workload 13-24
Using the Preprocess Captured Workload Wizard 13-25
Using the Replay Workload Wizard 13-26
Replay Workload: Prerequisites 13-27
Replay Workload: Choose Initial Options 13-28
Replay Workload: Customize Options 13-29
Replay Workload: Prepare Replay Clients 13-30
Replay Workload: Client Connections 13-31
Replay Workload: Replay Started 13-32
Viewing Workload Replay Progress 13-33
Viewing Workload Replay Statistics 13-34
Packages and Procedures 13-36
Data Dictionary Views: Database Replay 13-37
Database Replay: PL/SQL Example 13-38
Calibrating Replay Clients 13-40
Summary 13-41
Practice 13: Overview 13-42
14 Tuning the Shared Pool
Objectives 14-2
Shared Pool Architecture 14-3
Shared Pool Operation 14-4
The Library Cache 14-5
Latch and Mutex 14-7
Latch and Mutex: Views and Statistics 14-9
Diagnostic Tools for Tuning the Shared Pool 14-11
AWR/Statspack Indicators 14-13
Load Profile 14-14
Instance Efficiencies 14-15
Top Waits 14-16
Time Model 14-17
Library Cache Activity 14-19
Avoid Hard Parses 14-20
Are Cursors Being Shared? 14-21
Sharing Cursors 14-23
Adaptive Cursor Sharing: Example 14-25
Adaptive Cursor Sharing Views 14-27
Interacting with Adaptive Cursor Sharing 14-28
Avoiding Soft Parses 14-29
Sizing the Shared Pool 14-30
Oracle Internal & Oracle Academy Use Only
xiii
Shared Pool Advisory 14-31
Shared Pool Advisor 14-33
Avoiding Fragmentation 14-34
Large Memory Requirements 14-35
Tuning the Shared Pool Reserved Space 14-37
Keeping Large Objects 14-39
Data Dictionary Cache 14-41
Dictionary Cache Misses 14-42
SQL Query Result Cache: Overview 14-43
Managing the SQL Query Result Cache 14-44
Using the RESULT_CACHE Hint 14-46
Using the DBMS_RESULT_CACHE Package 14-47
Viewing SQL Result Cache Dictionary Information 14-48
SQL Query Result Cache: Considerations 14-49
UGA and Oracle Shared Server 14-50
Large Pool 14-51
Tuning the Large Pool 14-52
Summary 14-53
Practice Overview 14: Tuning the Shared Pool 14-54
15 Tuning the Buffer Cache
Objectives 15-2
Oracle Database Architecture 15-3
Buffer Cache: Highlights 15-4
Database Buffers 15-5
Buffer Hash Table for Lookups 15-6
Working Sets 15-7
Tuning Goals and Techniques 15-9
Symptoms 15-11
Cache Buffer Chains Latch Contention 15-12
Finding Hot Segments 15-13
Buffer Busy Waits 15-14
Calculating the Buffer Cache Hit Ratio 15-15
Buffer Cache Hit Ratio Is Not Everything 15-16
Interpreting Buffer Cache Hit Ratio 15-17
Read Waits 15-19
Free Buffer Waits 15-21
Solutions 15-22
Sizing the Buffer Cache 15-23
Buffer Cache Size Parameters 15-24
Dynamic Buffer Cache Advisory Parameter 15-25
Oracle Internal & Oracle Academy Use Only
xiv
Buffer Cache Advisory View 15-26
Using the V$DB_CACHE_ADVICE View 15-27
Using the Buffer Cache Advisory with EM 15-28
Caching Tables 15-29
Multiple Buffer Pools 15-30
Enabling Multiple Buffer Pools 15-32
Calculating the Hit Ratio for Multiple Pools 15-33
Multiple Block Sizes 15-35
Multiple Database Writers 15-36
Multiple I/O Slaves 15-37
Use Multiple Writers or I/O Slaves 15-38
Private Pool for I/O Intensive Operations 15-39
Automatically Tuned Multiblock Reads 15-40
Flushing the Buffer Cache (for Testing Only) 15-41
Summary 15-42
Practice 15: Overview Tuning the Buffer Cache 15-43
16 Tuning PGA and Temporary Space
Objectives 16-2
SQL Memory Usage 16-3
Performance Impact 16-4
Automatic PGA Memory 16-5
SQL Memory Manager 16-6
Configuring Automatic PGA Memory 16-8
Setting PGA_AGGREGATE_TARGET Initially 16-9
Monitoring SQL Memory Usage 16-10
Monitoring SQL Memory Usage: Examples 16-12
Tuning SQL Memory Usage 16-13
PGA Target Advice Statistics 16-14
PGA Target Advice Histograms 16-15
Automatic PGA and Enterprise Manager 16-16
Automatic PGA and AWR Reports 16-17
Temporary Tablespace Management: Overview 16-18
Temporary Tablespace: Best Practice 16-19
Configuring Temporary Tablespace 16-20
Temporary Tablespace Group: Overview 16-22
Temporary Tablespace Group: Benefits 16-23
Creating Temporary Tablespace Groups 16-24
Maintaining Temporary Tablespace Groups 16-25
View Tablespace Groups 16-26
Monitoring Temporary Tablespace 16-27
Oracle Internal & Oracle Academy Use Only
xv
Temporary Tablespace Shrink 16-28
Tablespace Option for Creating Temporary Table 16-29
Summary 16-30
Practice Overview 16: Tuning PGA Memory 16-31
17 Automatic Memory Management
Objectives 17-2
Oracle Database Architecture 17-3
Dynamic SGA 17-4
Granule 17-5
Memory Advisories 17-6
Manually Adding Granules to Components 17-7
Increasing the Size of an SGA Component 17-8
Automatic Shared Memory Management: Overview 17-9
SGA Sizing Parameters: Overview 17-10
Dynamic SGA Transfer Modes 17-11
Memory Broker Architecture 17-12
Manually Resizing Dynamic SGA Parameters 17-13
Behavior of Auto-Tuned SGA Parameters 17-14
Behavior of Manually Tuned SGA Parameters 17-15
Using the V$PARAMETER View 17-16
Resizing SGA_TARGET 17-17
Disabling Automatic Shared Memory Management 17-18
Configuring ASMM 17-19
SGA Advisor 17-20
Monitoring ASMM 17-21
Automatic Memory Management: Overview 17-22
Oracle Database Memory Parameters 17-24
Automatic Memory Parameter Dependency 17-25
Enabling Automatic Memory Management 17-26
Monitoring Automatic Memory Management 17-27
DBCA and Automatic Memory Management 17-29
Summary 17-30
Practice 17: Overview Using Automatic Memory Tuning 17-31
Oracle Internal & Oracle Academy Use Only
xvi
18 Tuning Segment Space Usage
Objectives 18-2
Space Management 18-3
Extent Management 18-4
Locally Managed Extents 18-5
Large Extents: Considerations 18-6
How Table Data Is Stored 18-8
Anatomy of a Database Block 18-9
Minimize Block Visits 18-10
The DB_BLOCK_SIZE Parameter 18-11
Small Block Size: Considerations 18-12
Large Block Size: Considerations 18-13
Block Allocation 18-14
Free Lists 18-15
Block Space Management 18-16
Block Space Management with Free Lists 18-17
Automatic Segment Space Management 18-19
Automatic Segment Space Management at Work 18-20
Block Space Management with ASSM 18-22
Creating an Automatic Segment Space Management Segment 18-23
Migration and Chaining 18-24
Guidelines for PCTFREE and PCTUSED 18-26
Detecting Migration and Chaining 18-27
Selecting Migrated Rows 18-28
Eliminating Migrated Rows 18-29
Shrinking Segments: Overview 18-31
Shrinking Segments: Considerations 18-32
Shrinking Segments by Using SQL 18-33
Segment Shrink: Basic Execution 18-34
Segment Shrink: Execution Considerations 18-35
Using EM to Shrink Segments 18-36
Table Compression: Overview 18-37
Table Compression Concepts 18-38
Using Table Compression 18-39
Summary 18-40
19 Tuning I/O
Objectives 19-2
I/O Architecture 19-3
File System Characteristics 19-4
I/O Modes 19-5
Oracle Internal & Oracle Academy Use Only
xvii
Direct I/O 19-6
Bandwidth Versus Size 19-7
Important I/O Metrics for Oracle Databases 19-8
I/O Calibration and Enterprise Manager 19-10
I/O Calibration and the PL/SQL Interface 19-11
I/O Statistics: Overview 19-13
I/O Statistics and Enterprise Manager 19-14
Stripe and Mirror Everything 19-16
Using RAID 19-17
RAID Cost Versus Benefits 19-18
Should I Use RAID 1 or RAID 5? 19-20
Diagnostics 19-21
Database I/O Tuning 19-22
What Is Automatic Storage Management? 19-23
Tuning ASM 19-24
How Many Disk Groups per Database 19-25
Which RAID Configuration for Best Availability? 19-26
ASM Mirroring Guidelines 19-27
ASM Striping Granularity 19-28
What Type of Striping Works Best? 19-29
ASM Striping Only 19-30
Hardware RAID Striped LUNs 19-31
ASM Guidelines 19-32
ASM Instance Initialization Parameters 19-33
Dynamic Performance Views 19-34
Monitoring Long-Running Operations by Using V$ASM_OPERATION 19-36
ASM Instance Performance Diagnostics 19-37
ASM Performance Page 19-38
Database Instance Parameter Changes 19-39
ASM Scalability 19-40
Summary 19-41
20 Performance Tuning Summary
Objectives 20-2
Necessary Initialization Parameters with Little Performance Impact 20-3
Important Initialization Parameters with Performance Impact 20-4
Sizing Memory Initially 20-6
Database High Availability: Best Practices 20-7
Undo Tablespace: Best Practices 20-8
Temporary Tablespace: Best Practices 20-9
General Tablespace: Best Practices 20-11
Internal Fragmentation Considerations 20-12
Oracle Internal & Oracle Academy Use Only
xviii
Block Size: Advantages and Disadvantages 20-13
Automatic Checkpoint Tuning 20-14
Sizing the Redo Log Buffer 20-15
Sizing Redo Log Files 20-16
Increasing the Performance of Archiving 20-17
Automatic Statistics Gathering 20-19
Automatic Statistics Collection: Considerations 20-20
Commonly Observed Wait Events 20-21
Additional Statistics 20-22
Top 10 Mistakes Found in Customer Systems 20-23
Summary 20-25
Appendix A: Practices and Solutions
Appendix B: Using Statspack
Index -
SQL Tuning Advisor against the session (is it poosible)
My Company customer has observed that there is job that are running longer than expected running(5 days).
They did not gave any information.they want me to run
SQL Tuning Advisor against the session running this job.
can you run sql tunning advisor against running session?
if so how
Please suggest me your valuable tips so that I approach this work properly.
DB = 11g
OS= Solaris 10>
...SQL Tuning Advisor against the session running this job.
can you run sql tunning advisor against running session?
>
SQL Tuning Advisor is run on statements and not sessions. I don't do much with SQL Tuning Advisor, but I'd consider that current running sessions a lost cause until it completes or you kill it. You can see the "estimate" of how long that current running SQL is going to take in v$session_longops. You can use a script like Tanel's sw.sql
http://blog.tanelpoder.com/2008/01/08/updated-session-wait-script/
to see what the wait interface has to say.
>
Please suggest me your valuable tips so that I approach this work properly.
>
My approach for this would be to determine what the current explain plan is and compare it to one that ran (correctly) in the past and then try to determine why it changed. (bad stats, dropped index, parameter changes, etc).
Cheers. -
What Book for the new 1Z0-117 '11gR2 SQL Tuning' ? No OPC available yet.
Since 1Z0-117 '11gR2 SQL Tuning' is a new exam on beta yet, except Mathew Morris's summary is there a comprehensive Exam Reference Guide like OPC Oracle Experts Exam Guide ?
Is the +"*Oracle Press Database 11g Release 2 Performance Tuning Tips & Techniques*"+ sufficient ?
Or I just can look at the Covered Topics and study them from it and other resources ?
Thank youHmm understood.I will have to map the Sources Topics to the Exams Topics than just having a "served food", like an ordinary exam, its fair enough.
Its just the concepts concerned are many and many are complex, so specifially here I would require a specially fit OPC book like for SQL Expert.
Luckily I'd oredered yours at least.
See SQL Experts, I found the topics quite affordable and I advance quick about 1-2 chapters + Sumed Revision per day, and without questions or errors.
I guess because of
1.the OPC Book
2. since my curent internship is on SQL Analysis
3. my Thesis was creating an essential DBMS in C++ with embeded SQL Parser and PhP ODBC driver from Scratch
So I may try start having a look at SQL Tunning also, thus I dont think I could really achieve in paralel preparing for both and with the Internship also.
Thank you very much once again. -
ADDM Findings Top SQL Statements
Hi,
I have run addmrpt.sql for 1 month of time using snapshots and every ADDM report says that sql statement having id **** listed under top sql statements findings and recommendation is to tune using sql tunning advisor. It has 2-4 seconds elapsed time.But when i go through AWR report instance efficiency report and all are normal.
Can anyone please confirm whether I should recommend to tune this SQL statement to my vendor ?
Thanks,
TKbelow is the sql I found in ADDM. As I understood it is an intername SQL not an application SQL. When i searched it in internet found that it is related with check_oracle_health plugin. can you please help me to understand this nagios concept and the relationship it has with oracle software. And also how should I identify which methods we are using to monitor database internally?
SELECT
a.tablespace_name "Tablespace",
b.status "Status",
b.contents "Type",
b.extent_management "Extent Mgmt",
a.bytes bytes,
a.maxbytes bytes_max,
c.bytes_free + NVL(d.bytes_expired,0) bytes_free
FROM
-- belegter und maximal verfuegbarer platz pro datafile
-- nach tablespacenamen zusammengefasst
-- => bytes
-- => maxbytes
SELECT
a.tablespace_name,
SUM(a.bytes) bytes,
SUM(DECODE(a.autoextensible, 'YES', a.maxbytes, 'NO', a.bytes))
maxbytes
FROM
dba_data_files a
GROUP BY
tablespace_name
) a,
sys.dba_tablespaces b,
-- freier platz pro tablespace
-- => bytes_free
SELECT
a.tablespace_name,
SUM(a.bytes) bytes_free
FROM
dba_free_space a
GROUP BY
tablespace_name
) c,
-- freier platz durch expired extents
-- speziell fuer undo tablespaces
-- => bytes_expired
SELECT
a.tablespace_name,
SUM(a.bytes) bytes_expired
FROM
dba_undo_extents a
WHERE
status = 'EXPIRED'
GROUP BY
tablespace_name
) d
WHERE
a.tablespace_name = c.tablespace_name
AND a.tablespace_name = b.tablespace_name@@@@@@@@
AND a.tablespace_name = d.tablespace_name
UNION ALL
SELECT
d.tablespace_name "Tablespace",
b.status "Status",
b.contents "Type",
b.extent_management "Extent Mgmt",
sum(a.bytes_free + a.bytes_used) bytes, -- allocated
SUM(DECODE(d.autoextensible, 'YES', d.maxbytes, 'NO', d.bytes))
bytes_max,
SUM(a.bytes_free + a.bytes_used - NVL(c.bytes_used, 0)) bytes_free
FROM
sys.v_$TEMP_SPACE_HEADER a,
sys.dba_tablespaces b,
sys.v_$Temp_extent_pool c,
dba_temp_files d
WHERE
c.file_id(+) = a.file_id
and c.tablespace_name(+) = a.tablespace_name
and d.file_id = a.file_id
and d.tablespace_name = a.tablespace_name
and b.tablespace_name = a.tablespace_name
GROUP BY
b.status,
b.contents,
b.extent_management,
d.tablespace_name
ORDER BY
1
Maybe you are looking for
-
Unable to download Raw files from Canon 5D Mark III. [was:Blue flower]
When I download my raw images from my canon eos 5d mark 3 I get a blue flower and no image. How do I fix this.
-
Obtain/execute Sequence Generator in Toplink JPA
Hi, I have an entity bean with a database sequence for its primary key. I can´t use something like: @Id @Column(name = "EMP_ID", nullable = false) @GeneratedValue(generator="EMPSEQ") @SequenceGenerator(name="EMPSEQ",sequenceName="EMP_SEQ", allocation
-
Slow database insert condition
I have a situation were we have multiple sessions inserting data in a partitioned table. At any given time we could have multiple sessions. The problem we are facing is that for some reason the insert is taking really logn(say 10 sec or greater) for
-
Good day, we have a delphi application using wdtfuncs.ocx to connect to SAP via RFC. Since we updated the GUI from 6.2 to 6.4 we have the strange problem, that in some cases select statements returning 0 hits (they should return at least 1 hit). Afte
-
Hi I am working on entity beans while running the client program it is giving exception ora-01745 invalid host/bind name i am not aware ot this exception i created datasource and connection pool in weblogic server please help me