Help for performance tunning
Hi Gurus,
I m new to the group and SAP BW as well,so i need ur valuable inputs for a Performance related Project.
I m going to start a new project in a wks time so and i m working as a Performance Tuning Consultant on that(Load & Query Performance),but i don't have any idea about this,so i need ur valuable advice on that,plz.
Can anyone plz suggest me the possible ways of suggestions so that i can tell the client as a gud consultant to start with but these days i m going though BW Performance & Authorization(BW360) which is really helpful for me but apart from that i need ur valuable inputs as well.
Thanks in Advance.
regards
Amit
hi Amit,
check this.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/afbad390-0201-0010-daa4-9ef0168d41b6
also
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/10b589ad-0701-0010-0299-e5c282b7aaad
regards.
Similar Messages
-
Need help for performance tunning
Hello,
I have 16K records return by query, it takes long time to proceed for 7K it takes 7.5 sec.
Note: I used all seeded tables only.
If possible please help me to tune it.
SELECT msi.inventory_item_id,msi.segment1,msi.rimary_uom_code , msi.primary_unit_of_measure
FROM mtl_system_items_b msi, qp_list_lines qpll,qp_pricing_attributes qppr,
mtl_category_sets_tl mcs,mtl_category_sets_b mcsb,
mtl_categories_b mc, mtl_item_categories mcb
WHERE msi.enabled_flag = 'Y'
AND qpll.list_line_id = qppr.list_line_id
AND qppr.product_attr_value = TO_CHAR (msi.inventory_item_id(+))
AND qppr.product_uom_code = msi.primary_uom_code
AND mc.category_id = mcb.category_id
AND msi.inventory_item_id = mcb.inventory_item_id
AND msi.organization_id = mcb.organization_id
AND TRUNC (SYSDATE) BETWEEN NVL (qpll.start_date_active,TRUNC (SYSDATE)) AND NVL (qpll.end_date_active,TRUNC (SYSDATE))
AND mcs.category_set_name = 'LSS SALES CATEGORY'
AND mcs.language = 'US'
AND mcs.category_set_id = mcsb.category_set_id
AND mcsb.structure_id = mc.structure_id
AND msi.organization_id = :p_organization_id
AND qpll.list_header_id = :p_price_list_id
AND mcb.category_id = :p_category_id;
Thanks and regards
Akil.Thanks Helios ,
here is answers
Databse version
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit
PL/SQL Release 11.1.0.7.0
explain plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
|
0 | SELECT STATEMENT
| |
1 | 149 | 9439
(1)|
|
1 | NESTED LOOPS | | 1 |
149 | 9439 (1)|
|*
2 | HASH JOIN OUTER | | 1 |
135 | 9437 (1)|
|*
3 | HASH JOIN | | 1 |
71 | 9432 (1)|
|
4 | NESTED LOOPS | | 2 |
76 | 53 (0)|
|*
5 | TABLE ACCESS BY INDEX
ROWID| QP_LIST_LINES | 2 |
44 | 49 (0)|
|*
6 | INDEX SKIP SCAN | QP_LIST_LINES_N2 |
702 | | 20
(0)|
|*
7 | INDEX RANGE SCAN | QP_PRICING_ATTRIBUTES_N3 | 1 |
16 | 2 (0)|
|*
8 | TABLE ACCESS BY INDEX
ROWID | MTL_SYSTEM_ITEMS_B | 46254
| 1490K|
9378 (1)|
|*
9 | INDEX RANGE SCAN | MTL_SYSTEM_ITEMS_B_N9 | 46254 | |
174 (1)|
|
10 | TABLE ACCESS FULL | XX_WEB_ITEM_IMAGE_TBL |
277 | 17728 | 5 (0)|
|* 11 | INDEX RANGE SCAN | MTL_ITEM_CATEGORIES_U1 |
1 | 14 | 2
(0)|
Predicate Information (identified
by operation id):
2 -
access("XWIIT"."IMAGE_CODE"(+)="MSI"."SEGMENT1")
3 -
access("QPPR"."PRODUCT_ATTR_VALUE"=TO_CHAR("MSI"."INVENTORY_ITEM_ID")
AND
"QPPR"."PRODUCT_UOM_CODE"="MSI"."PRIMARY_UOM_CODE")
5 - filter(NVL("QPLL"."START_DATE_ACTIVE",TRUNC(SYSDATE@!))<=TRUNC(SYSDATE@!)
AND
NVL("QPLL"."END_DATE_ACTIVE",TRUNC(SYSDATE@!))>=TRUNC(SYSDATE@!))
6 -
access("QPLL"."LIST_HEADER_ID"=TO_NUMBER(:P_PRICE_LIST_ID))
filter("QPLL"."LIST_HEADER_ID"=TO_NUMBER(:P_PRICE_LIST_ID))
7 -
access("QPLL"."LIST_LINE_ID"="QPPR"."LIST_LINE_ID")
filter("QPPR"."PRODUCT_UOM_CODE" IS NOT NULL)
8 - filter("MSI"."ENABLED_FLAG"='Y')
9 - access("MSI"."ORGANIZATION_ID"=TO_NUMBER(:P_ORGANIZATION_ID))
11 -
access("MCB"."ORGANIZATION_ID"=TO_NUMBER(:P_ORGANIZATION_ID)
AND
"MSI"."INVENTORY_ITEM_ID"="MCB"."INVENTORY_ITEM_ID"
AND
"MCB"."CATEGORY_ID"=TO_NUMBER(:P_CATEGORY_ID))
filter("MCB"."CATEGORY_ID"=TO_NUMBER(:P_CATEGORY_ID))
Note
- 'PLAN_TABLE' is old version
TKprof Plan
TKPROF: Release 11.1.0.7.0 - Production on Fri Nov 15 06:12:26 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: LSSD_ora_19760.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
SELECT msi.inventory_item_id,
msi.segment1,
primary_uom_code,
primary_unit_of_measure,
xwiit.image_url
FROM mtl_system_items_b msi,
qp_list_lines qpll,
qp_pricing_attributes qppr,
mtl_item_categories mcb,
xx_web_item_image_tbl xwiit
WHERE msi.enabled_flag = 'Y'
AND qpll.list_line_id = qppr.list_line_id
AND qppr.product_attr_value = TO_CHAR (msi.inventory_item_id)
AND qppr.product_uom_code = msi.primary_uom_code
AND msi.inventory_item_id = mcb.inventory_item_id
AND msi.organization_id = mcb.organization_id
AND TRUNC (SYSDATE) BETWEEN NVL (qpll.start_date_active,
TRUNC (SYSDATE))
AND NVL (qpll.end_date_active,
TRUNC (SYSDATE))
AND xwiit.image_code(+) = msi.segment1
AND msi.organization_id = :p_organization_id
AND qpll.list_header_id = :p_price_list_id
AND mcb.category_id = :p_category_id
call count cpu elapsed disk query current rows
Parse 2 0.00 0.00 0 0 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 2 3.84 3.85 0 432560 0 1002
total 6 3.84 3.85 0 432560 0 1002
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 173
Rows Row Source Operation
501 NESTED LOOPS (cr=216280 pr=0 pw=0 time=115 us cost=9439 size=149 card=1)
2616 HASH JOIN OUTER (cr=211012 pr=0 pw=0 time=39 us cost=9437 size=135 card=1)
78568 HASH JOIN (cr=210997 pr=0 pw=0 time=3786 us cost=9432 size=71 card=1)
78571 NESTED LOOPS (cr=29229 pr=0 pw=0 time=35533 us cost=53 size=76 card=2)
78571 TABLE ACCESS BY INDEX ROWID QP_LIST_LINES (cr=9943 pr=0 pw=0 time=27533 us cost=49 size=44 card=2)
226733 INDEX SKIP SCAN QP_LIST_LINES_N2 (cr=865 pr=0 pw=0 time=4122 us cost=20 size=0 card=702)(object id 99730)
78571 INDEX RANGE SCAN QP_PRICING_ATTRIBUTES_N3 (cr=19286 pr=0 pw=0 time=0 us cost=2 size=16 card=1)(object id 99733)
128857 TABLE ACCESS BY INDEX ROWID MTL_SYSTEM_ITEMS_B (cr=181768 pr=0 pw=0 time=9580 us cost=9378 size=1526382 card=46254)
128857 INDEX RANGE SCAN MTL_SYSTEM_ITEMS_B_N9 (cr=450 pr=0 pw=0 time=1657 us cost=174 size=0 card=46254)(object id 199728)
277 TABLE ACCESS FULL XX_WEB_ITEM_IMAGE_TBL (cr=15 pr=0 pw=0 time=22 us cost=5 size=17728 card=277)
501 INDEX RANGE SCAN MTL_ITEM_CATEGORIES_U1 (cr=5268 pr=0 pw=0 time=0 us cost=2 size=14 card=1)(object id 99557)
Note: I modified query and it gives good result, now it takes 3 to 4 sec for 16000 records.
If possible can you plz explain what we have to take care while doing performance tunning
I am a fresher so don't have that much idea.
and also Thanks Hussein for your replay -
Help for Rewrite/tune the quey
Hi,
Could you please help to rewrite or tune the below query.
database
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bitQuery
SELECT *
FROM
(SELECT q.*,
ROWNUM AS rowindex,
COUNT(*) OVER() AS record_count
FROM
(SELECT get_cand_session_number(ccr.split_session_year,ccr.split_session_month,ccr.candidate) AS candidate_session_number,
ca.candidate,
ca.lastname,
ca.firstname,
(SELECT csl.status_type
FROM ibis.cw_status_lookup csl
WHERE csl.status_id = ccp.status_id
) AS status,
ccp.candidate_portfolio_id
FROM ibis.candidate_component_reg ccr
INNER JOIN
(SELECT self_taught,
YEAR,
MONTH,
main_school,
candidate,
subject,
subject_option,
lvl,
language,
withdrawn,
programme
FROM ibis.candidate_subject_registration
) csr
ON csr.year = :v_year
AND csr.month =:v_month
AND csr.main_school =ccr.main_school
AND csr.candidate =ccr.candidate
AND csr.subject =ccr.subject
AND csr.subject_option=ccr.subject_option
AND csr.lvl = ccr.lvl
AND csr.language =ccr.language
AND csr.withdrawn ='N'
INNER JOIN
(SELECT YEAR,
MONTH,
candidate,
programme,
exam_seq_num
FROM ibis.candidate_session_detail
) csd
ON csd.year = :v_year
AND csd.month = :v_month
AND csd.candidate = csr.candidate
AND csd.programme = ccr.programme
AND csd.exam_seq_num = NVL(NULL,csd.exam_seq_num)
INNER JOIN
(SELECT candidate,lastname,firstname FROM ibis.candidate
) ca
ON ca.candidate=csd.candidate
INNER JOIN
(SELECT status_id,
candidate_portfolio_id,
YEAR,
MONTH,
paper_code,
candidate
FROM ibis.cw_candidate_portfolio
) ccp
ON ccp.year = :v_year
AND ccp.month = :v_month
AND ccp.paper_code = ccr.paper_code
AND ccp.candidate = ccr.candidate
WHERE ccr.split_session_year = :v_year
AND ccr.split_session_month = :v_month
AND ccr.component = :v_component
AND ccr.withdrawn ='N'
AND ccr.assessment_school =NVL(:v_school_code,ccr.assessment_school)
AND ccr.subject = NVL(:v_subject,ccr.subject)
AND ccr.subject_option = NVL(:v_subject_option,ccr.subject_option)
AND ccr.lvl = NVL(:v_lvl,ccr.lvl)
AND ccr.language = NVL(:v_language,ccr.language)
AND ((csr.self_taught ='N'
AND ccr.sampled ='Y'
AND ccr.deleted_from_sample ='N'
AND EXISTS
(SELECT 1
FROM ibis.subject_component sc
WHERE sc.year = ccr.split_session_year
AND sc.month = ccr.split_session_month
AND ccr.paper_code =sc.paper_code
AND sc.subject = ccr.subject
AND sc.subject_option =ccr.subject_option
AND sc.lvl = ccr.lvl
AND sc.language =ccr.language
AND sc.component =ccr.component
AND sc.assessment_method_id = 11
AND sc.assessment_type = 'INTERNAL'
AND NOT EXISTS
(SELECT 1
FROM ibis.cw_portfolio_template cpt
WHERE ccr.split_session_year = cpt.year
AND ccr.split_session_month = cpt.month
AND ccr.subject = cpt.subject
AND ccr.subject_option = cpt.subject_option
AND ccr.component = cpt.component
AND cpt.combined = 'Y'
OR (csr.self_taught='Y'
AND EXISTS
(SELECT 1
FROM ibis.subject_component sc
WHERE sc.year = ccr.split_session_year
AND sc.month = ccr.split_session_month
AND ccr.paper_code =sc.paper_code
AND sc.subject = ccr.subject
AND sc.subject_option =ccr.subject_option
AND sc.lvl = ccr.lvl
AND sc.language =ccr.language
AND sc.component =ccr.component
AND sc.assessment_method_id = 11
AND sc.assessment_type = 'INTERNAL'
AND NOT EXISTS
(SELECT 1
FROM ibis.cw_portfolio_template cpt
WHERE ccr.split_session_year = cpt.year
AND ccr.split_session_month = cpt.month
AND ccr.subject = cpt.subject
AND ccr.subject_option = cpt.subject_option
AND ccr.component = cpt.component
AND cpt.combined = 'Y'
OR (EXISTS
(SELECT 1
FROM ibis.cw_portfolio_template cpt
WHERE ccr.split_session_year = cpt.year
AND ccr.split_session_month = cpt.month
AND ccr.subject = cpt.subject
AND ccr.subject_option = cpt.subject_option
AND ccr.component = cpt.component
AND cpt.combined = 'Y'
AND EXISTS
(SELECT 1
FROM ibis.subject_component sc
WHERE sc.year = ccr.split_session_year
AND sc.month = ccr.split_session_month
AND ccr.paper_code =sc.paper_code
AND sc.subject = ccr.subject
AND sc.subject_option =ccr.subject_option
AND sc.lvl = ccr.lvl
AND sc.language =ccr.language
AND sc.component =ccr.component
AND sc.assessment_method_id = 11
UNION
SELECT get_cand_session_number(ssm.year,ssm.month,ccr.candidate) AS candidate_session_number,
ca.candidate,
ca.lastname,
ca.firstname,
(SELECT csl.status_type
FROM ibis.cw_status_lookup csl
WHERE csl.status_id = ccp.status_id
) AS status,
ccp.candidate_portfolio_id
FROM ibis.school_sample_mark_additional ssm,
ibis.candidate_component_reg ccr,
ibis.candidate ca,
ibis.candidate_session_detail csd,
ibis.cw_candidate_portfolio ccp
WHERE ssm.year = :v_year
AND ssm.month = :v_month
AND ssm.candidate IS NOT NULL
AND ssm.year = ccr.split_session_year
AND ssm.month =ccr.split_session_month
AND ccr.assessment_school =ssm.school_code
AND ssm.candidate =ccr.candidate
AND ssm.paper_code = ccr.paper_code
AND ccr.component = :v_component
AND ccr.split_session_year = csd.year
AND ccr.split_session_month = csd.month
AND ccr.candidate =csd.candidate
AND ccr.programme = csd.programme
AND csd.candidate =ca.candidate
AND ccr.split_session_year = ccp.year
AND ccr.split_session_month = ccp.month
AND ccr.paper_code =ccp.paper_code
AND ccr.candidate = ccp.candidate
AND ssm.school_code = NVL(:v_school_code,ssm.school_code)
AND ccr.subject = NVL(:v_subject,ccr.subject)
AND ccr.subject_option = NVL(:v_subject_option,ccr.subject_option)
AND ccr.lvl = NVL(:v_lvl,ccr.lvl)
AND ccr.language = NVL(:v_language,ccr.language)
AND csd.exam_seq_num = NVL(:v_candidate,csd.exam_seq_num)
)q
) sq
WHERE ROWINDEX >=:v_startrow
AND ROWINDEX <= (:v_startrow + (:v_maxrows - 1) );explain plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 4 | 8708 | 363 (1)| 00:00:06 |
|* 1 | FILTER | | | | | |
|* 2 | VIEW | | 4 | 8708 | 363 (1)| 00:00:06 |
| 3 | WINDOW BUFFER | | 4 | 8604 | 363 (1)| 00:00:06 |
| 4 | COUNT | | | | | |
| 5 | VIEW | | 4 | 8604 | 363 (1)| 00:00:06 |
| 6 | SORT UNIQUE | | 4 | 1016 | 363 (14)| 00:00:06 |
| 7 | UNION-ALL | | | | | |
| 8 | CONCATENATION | | | | | |
|* 9 | FILTER | | | | | |
|* 10 | FILTER | | | | | |
| 11 | TABLE ACCESS BY INDEX ROWID | CW_CANDIDATE_PORTFOLIO | 1 | 44 | 3 (0)| 00:00:01 |
| 12 | NESTED LOOPS | | 1 | 270 | 299 (1)| 00:00:05 |
| 13 | NESTED LOOPS | | 1 | 226 | 296 (1)| 00:00:05 |
| 14 | NESTED LOOPS | | 1 | 200 | 294 (1)| 00:00:05 |
| 15 | NESTED LOOPS | | 35 | 3080 | 190 (1)| 00:00:03 |
| 16 | TABLE ACCESS BY INDEX ROWID| CANDIDATE_SESSION_DETAIL | 35 | 980 | 92 (2)| 00:00:02 |
|* 17 | INDEX RANGE SCAN | SESSION_SCHL_CAND | 35 | | 77 (2)| 00:00:02 |
|* 18 | TABLE ACCESS BY INDEX ROWID| CANDIDATE_SUBJECT_REGISTRATION | 1 | 60 | 3 (0)| 00:00:01 |
|* 19 | INDEX RANGE SCAN | Y_M_CAND_SUBJ_LVL_OPTION | 1 | | 2 (0)| 00:00:01 |
|* 20 | TABLE ACCESS BY INDEX ROWID | CANDIDATE_COMPONENT_REG | 1 | 112 | 3 (0)| 00:00:01 |
|* 21 | INDEX RANGE SCAN | SPLIT_SESSION_CANDIDATE | 1 | | 2 (0)| 00:00:01 |
| 22 | TABLE ACCESS BY INDEX ROWID | CANDIDATE | 1 | 26 | 2 (0)| 00:00:01 |
|* 23 | INDEX UNIQUE SCAN | CANDIDATE_PK | 1 | | 1 (0)| 00:00:01 |
|* 24 | INDEX RANGE SCAN | CANDIDATE_PORTFOLIO_INDEX1 | 1 | | 2 (0)| 00:00:01 |
|* 25 | TABLE ACCESS BY INDEX ROWID | CW_PORTFOLIO_TEMPLATE | 1 | 46 | 4 (0)| 00:00:01 |
|* 26 | INDEX RANGE SCAN | YEAR_MON_PORTFOLIO_TEMPLATE | 1 | | 3 (0)| 00:00:01 |
|* 27 | TABLE ACCESS BY INDEX ROWID | SUBJECT_COMPONENT | 1 | 96 | 4 (0)| 00:00:01 |
|* 28 | INDEX RANGE SCAN | SUBJECT_COMPONENT_PK | 1 | | 3 (0)| 00:00:01 |
|* 29 | TABLE ACCESS BY INDEX ROWID | CW_PORTFOLIO_TEMPLATE | 1 | 46 | 4 (0)| 00:00:01 |
|* 30 | INDEX RANGE SCAN | YEAR_MON_PORTFOLIO_TEMPLATE | 1 | | 3 (0)| 00:00:01 |
|* 31 | TABLE ACCESS BY INDEX ROWID | SUBJECT_COMPONENT | 1 | 96 | 4 (0)| 00:00:01 |
|* 32 | INDEX RANGE SCAN | SUBJECT_COMPONENT_PK | 1 | | 3 (0)| 00:00:01 |
|* 33 | TABLE ACCESS BY INDEX ROWID | CW_PORTFOLIO_TEMPLATE | 1 | 46 | 4 (0)| 00:00:01 |
|* 34 | INDEX RANGE SCAN | YEAR_MON_PORTFOLIO_TEMPLATE | 1 | | 3 (0)| 00:00:01 |
|* 35 | TABLE ACCESS BY INDEX ROWID | SUBJECT_COMPONENT | 1 | 87 | 4 (0)| 00:00:01 |
|* 36 | INDEX RANGE SCAN | SUBJECT_COMPONENT_PK | 1 | | 3 (0)| 00:00:01 |
|* 37 | FILTER | | | | | |
|* 38 | FILTER | | | | | |
| 39 | NESTED LOOPS | | 1 | 270 | 16 (0)| 00:00:01 |
| 40 | NESTED LOOPS | | 1 | 244 | 14 (0)| 00:00:01 |
| 41 | NESTED LOOPS | | 1 | 216 | 12 (0)| 00:00:01 |
| 42 | NESTED LOOPS | | 1 | 156 | 9 (0)| 00:00:01 |
|* 43 | TABLE ACCESS BY INDEX ROWID | CANDIDATE_COMPONENT_REG | 1 | 112 | 6 (0)| 00:00:01 |
|* 44 | INDEX RANGE SCAN | ASSESSMENT_SPLIT_SESSION | 1 | | 5 (0)| 00:00:01 |
| 45 | TABLE ACCESS BY INDEX ROWID | CW_CANDIDATE_PORTFOLIO | 1 | 44 | 3 (0)| 00:00:01 |
|* 46 | INDEX RANGE SCAN | CANDIDATE_PORTFOLIO_INDEX1 | 1 | | 2 (0)| 00:00:01 |
|* 47 | TABLE ACCESS BY INDEX ROWID | CANDIDATE_SUBJECT_REGISTRATION | 1 | 60 | 3 (0)| 00:00:01 |
|* 48 | INDEX RANGE SCAN | CAND_REG_SCHOOL | 1 | | 2 (0)| 00:00:01 |
|* 49 | TABLE ACCESS BY INDEX ROWID | CANDIDATE_SESSION_DETAIL | 1 | 28 | 2 (0)| 00:00:01 |
|* 50 | INDEX UNIQUE SCAN | CANDIDATE_DETAIL_PK | 1 | | 1 (0)| 00:00:01 |
| 51 | TABLE ACCESS BY INDEX ROWID | CANDIDATE | 1 | 26 | 2 (0)| 00:00:01 |
|* 52 | INDEX UNIQUE SCAN | CANDIDATE_PK | 1 | | 1 (0)| 00:00:01 |
|* 53 | TABLE ACCESS BY INDEX ROWID | CW_PORTFOLIO_TEMPLATE | 1 | 46 | 4 (0)| 00:00:01 |
|* 54 | INDEX RANGE SCAN | YEAR_MON_PORTFOLIO_TEMPLATE | 1 | | 3 (0)| 00:00:01 |
|* 55 | TABLE ACCESS BY INDEX ROWID | SUBJECT_COMPONENT | 1 | 96 | 4 (0)| 00:00:01 |
|* 56 | INDEX RANGE SCAN | SUBJECT_COMPONENT_PK | 1 | | 3 (0)| 00:00:01 |
|* 57 | TABLE ACCESS BY INDEX ROWID | CW_PORTFOLIO_TEMPLATE | 1 | 46 | 4 (0)| 00:00:01 |
|* 58 | INDEX RANGE SCAN | YEAR_MON_PORTFOLIO_TEMPLATE | 1 | | 3 (0)| 00:00:01 |
|* 59 | TABLE ACCESS BY INDEX ROWID | SUBJECT_COMPONENT | 1 | 96 | 4 (0)| 00:00:01 |
|* 60 | INDEX RANGE SCAN | SUBJECT_COMPONENT_PK | 1 | | 3 (0)| 00:00:01 |
|* 61 | TABLE ACCESS BY INDEX ROWID | CW_PORTFOLIO_TEMPLATE | 1 | 46 | 4 (0)| 00:00:01 |
|* 62 | INDEX RANGE SCAN | YEAR_MON_PORTFOLIO_TEMPLATE | 1 | | 3 (0)| 00:00:01 |
|* 63 | TABLE ACCESS BY INDEX ROWID | SUBJECT_COMPONENT | 1 | 87 | 4 (0)| 00:00:01 |
|* 64 | INDEX RANGE SCAN | SUBJECT_COMPONENT_PK | 1 | | 3 (0)| 00:00:01 |
| 65 | CONCATENATION | | | | | |
|* 66 | FILTER | | | | | |
| 67 | TABLE ACCESS BY INDEX ROWID | CW_CANDIDATE_PORTFOLIO | 1 | 44 | 3 (0)| 00:00:01 |
| 68 | NESTED LOOPS | | 1 | 238 | 23 (0)| 00:00:01 |
| 69 | NESTED LOOPS | | 1 | 194 | 20 (0)| 00:00:01 |
| 70 | NESTED LOOPS | | 1 | 168 | 18 (0)| 00:00:01 |Edited by: user575115 onHi
i have seen your query and i am nt changing the whole query but i'll recommend some of the changes it may helps in the performance tuning...
1) write all the filter conditions in the FROM clause in correspondence to the tables for ex :
One way : select * from tab a, tab1 b where a.c = b.c and a.d in ('xx','lll')
Tuned way : select * from (select c from tab where d in ('xx','lll')) a, tab b where a.c = b.c (it provides lesser rows for joining)
2) Donot write Inline query in the select statement.You can try it.
for ex:
One way : select a.c, (select d from tab1 where tab1.d = a.e) from tab a
tuned way : select a.c, tab1.d from tab a, tab1 where tab1.d = a.e
3) Check the gathering of stats in 10G
4) Avoid using ANSI standered for JOINS for ex : Instead of select * from a inner join a on ... use select * from a, b where joining cond.(I am not confirmed)
5) If possible here use the WITH clause becuase you have use UNION and you have use some common tables which are executing twice in the current.
6) Use some HINTS like FIRST_ROWS
If somewhere i am wrong please correct me.
Edited by: user9292111 on 22-Mar-2012 01:52
Edited by: user9292111 on 22-Mar-2012 01:53 -
Hi,
I am looking for some help in tuning a query and details are below.
SELECT NVL(B.START_DATE_TIME,
A.START_DATE_TIME) START_DATE,
NVL(B.CUST_PRODUCTION_SEQ_NUM,
A.CUST_PRODUCTION_SEQ_NUM) PROD_NUM,
A.HEADER_ID NEW_HEADER_ID,
B.HEADER_ID OLD_HEADER_ID,
A.LINE_ID,
B.LINE_ID,
A.QTY_TYPE_CODE NEW_CODE,
B.QTY_TYPE_CODE OLD_CODE,
NVL(B.SHIP_FROM_ORG_ID,
A.SHIP_FROM_ORG_ID) SHIP_FROM_ORG_ID,
-- hrorg.name ship_from_name ,
NVL(B.SHIP_TO_ORG_ID,
A.SHIP_TO_ORG_ID) SHIP_TO_ORG_ID,
NVL(B.BILL_TO_ADDRESS_ID,
A.BILL_TO_ADDRESS_ID) BILL_TO_ADDRESS_ID,
NVL(B.SHIP_TO_ADDRESS_ID,
A.SHIP_TO_ADDRESS_ID) SHIP_TO_ADDRESS_ID,
NVL(B.SHIP_TO_NAME_EXT,
A.SHIP_TO_NAME_EXT) SHIP_TO_NAME,
NVL(B.INTRMD_SHIP_TO_ID,
A.INTRMD_SHIP_TO_ID) INTRMD_SHIP_TO_ID,
NVL(B.CUSTOMER_ITEM_ID,
A.CUSTOMER_ITEM_ID) CUSTOMER_ITEM_ID,
--mci.customer_item_desc customer_item_desc,
NVL(B.INVENTORY_ITEM_ID,
A.INVENTORY_ITEM_ID) INVENTORY_ITEM_ID,
NVL(B.ITEM_DETAIL_SUBTYPE,
A.ITEM_DETAIL_SUBTYPE) ITEM_DETAIL_SUBTYPE,
FND1.MEANING DETAIL_SUBTYPE,
NVL(B.UOM_CODE,
A.UOM_CODE) UOM_CODE,
NVL(B.CUST_PO_NUMBER,
A.CUST_PO_NUMBER) CUST_PO_NUMBER,
NVL(B.INDUSTRY_ATTRIBUTE1,
A.INDUSTRY_ATTRIBUTE1) CUST_RECORD_YEAR,
A.ITEM_DETAIL_QUANTITY,
A.ITEM_DETAIL_TYPE,
FND2.MEANING NEW_DETAIL_TYPE,
B.ITEM_DETAIL_QUANTITY,
B.ITEM_DETAIL_TYPE,
FND3.MEANING OLD_DETAIL_TYPE
FROM RLM_SCHEDULE_LINES_ALL A,
(SELECT * FROM RLM_SCHEDULE_LINES_ALL b_in
WHERE TRUNC(b_in.START_DATE_TIME) >=
(SELECT TRUNC(SCHED_HORIZON_START_DATE)
FROM RLM_SCHEDULE_HEADERS
WHERE HEADER_ID = :P_NEW_HEADER_ID)---
AND TRUNC(b_in.START_DATE_TIME) <=
(SELECT TRUNC(SCHED_HORIZON_END_DATE)
FROM RLM_SCHEDULE_HEADERS
WHERE HEADER_ID = :P_NEW_HEADER_ID)
AND HEADER_ID = (SELECT header_id
FROM apps.rlm_schedule_headers_all
WHERE header_id =
(SELECT MAX(rsha.header_id)
FROM apps.rlm_schedule_headers_all rsha,
apps.rlm_schedule_lines_all rsla
WHERE rsha.customer_id = :p_customer_id
AND rsha.schedule_type = :p_schedule_type
AND rsla.inventory_item_id = b_in.inventory_item_id ---
AND rsla.org_id = rsha.org_id
AND (((rsla.cust_po_number = b_in.cust_po_number)AND
EXISTS (SELECT 'x'
FROM FND_LOOKUP_VALUES_VL FLV,
RA_CUSTOMERS RC
WHERE FLV.LOOKUP_TYPE = 'TEST_RLM_CHECK_CUST'
AND FLV.MEANING = RC.CUSTOMER_NAME
AND RC.CUSTOMER_ID = :P_CUSTOMER_ID))
OR
NOT EXISTS (SELECT 'x'
FROM FND_LOOKUP_VALUES_VL FLV,
RA_CUSTOMERS RC
WHERE FLV.LOOKUP_TYPE = 'TEST_RLM_CHECK_CUST'
AND FLV.MEANING = RC.CUSTOMER_NAME
AND RC.CUSTOMER_ID = :P_CUSTOMER_ID) )---
and rsha.header_id = rsla.header_id
and rsla.ship_from_org_id = :p_ship_from_org_id
AND rsha.ece_tp_location_code_ext = :p_ece_tp_location_code_ext
AND NVL(rsha.header_ref_value_1, '1') =
NVL(rsha.header_ref_value_1, '1')
AND rsha.header_id NOT IN
(SELECT header_id
FROM apps.rlm_schedule_headers_all
WHERE attribute1 = :p_request_id)))) B,
--rlm_schedule_headers c,
-- hr_organization_units hrorg,
--mtl_customer_items mci,
FND_LOOKUPS FND1,
FND_LOOKUPS FND2,
FND_LOOKUPS FND3
-- ra_addresses_all radd2,
-- ra_site_uses_all rsu2
WHERE A.HEADER_ID(+) = :P_NEW_HEADER_ID
----AND B.HEADER_ID = :P_OLD_HEADER_ID
AND A.CUSTOMER_ITEM_ID(+) = B.CUSTOMER_ITEM_ID
AND A.SHIP_TO_ORG_ID(+) = B.SHIP_TO_ORG_ID
AND A.SHIP_FROM_ORG_ID(+) = B.SHIP_FROM_ORG_ID
AND A.INVENTORY_ITEM_ID(+) = B.INVENTORY_ITEM_ID
AND NVL(A.INTRMD_SHIP_TO_ID(+),
NVL(B.INTRMD_SHIP_TO_ID,
0)) = NVL(B.INTRMD_SHIP_TO_ID,
0)
AND A.ITEM_DETAIL_SUBTYPE(+) = B.ITEM_DETAIL_SUBTYPE
AND A.UOM_CODE(+) = B.UOM_CODE
AND NVL(A.CUST_PO_NUMBER(+),
NVL(B.CUST_PO_NUMBER,
0)) = NVL(B.CUST_PO_NUMBER,
0)
AND A.ITEM_DETAIL_TYPE(+) < :P_ITEM_DETAIL_TYPE
AND B.ITEM_DETAIL_TYPE < :P_ITEM_DETAIL_TYPE
AND TRUNC(A.START_DATE_TIME(+)) = TRUNC(B.START_DATE_TIME)
AND FND1.LOOKUP_CODE = NVL(A.ITEM_DETAIL_SUBTYPE,
B.ITEM_DETAIL_SUBTYPE)
AND FND1.LOOKUP_TYPE = :P_RLM_DETAIL_SUBTYPE_CODE
AND NVL(A.ITEM_DETAIL_TYPE,
'0') = FND2.LOOKUP_CODE
AND FND2.LOOKUP_TYPE = :P_RLM_DETAIL_TYPE_CODE
AND FND3.LOOKUP_CODE = B.ITEM_DETAIL_TYPE
AND A.SHIP_FROM_ORG_ID(+) = :P_SHIP_FROM_ORG_ID
AND B.SHIP_FROM_ORG_ID = :P_SHIP_FROM_ORG_ID
AND FND3.LOOKUP_TYPE = :P_RLM_DETAIL_TYPE_CODE
AND B.CUSTOMER_ITEM_ID IN
(SELECT DISTINCT CUSTOMER_ITEM_ID
FROM RLM_SCHEDULE_LINES_ALL
WHERE HEADER_ID = :P_NEW_HEADER_ID) &P_WHERE4 &P_WHERE3
-- CHANGES
&P_WHERE_DATE_A
UNION
SELECT NVL(A.START_DATE_TIME,
B.START_DATE_TIME) START_DATE,
NVL(A.CUST_PRODUCTION_SEQ_NUM,
B.CUST_PRODUCTION_SEQ_NUM) PROD_NUM,
A.HEADER_ID NEW_HEADER_ID,
B.HEADER_ID OLD_HEADER_ID,
A.LINE_ID,
B.LINE_ID,
A.QTY_TYPE_CODE NEW_CODE,
B.QTY_TYPE_CODE OLD_CODE,
NVL(A.SHIP_FROM_ORG_ID,
B.SHIP_FROM_ORG_ID) SHIP_FROM_ORG_ID,
-- hrorg.name ship_from_name ,
NVL(A.SHIP_TO_ORG_ID,
B.SHIP_TO_ORG_ID) SHIP_TO_ORG_ID,
NVL(A.BILL_TO_ADDRESS_ID,
B.BILL_TO_ADDRESS_ID) BILL_TO_ADDRESS_ID,
NVL(A.SHIP_TO_ADDRESS_ID,
B.SHIP_TO_ADDRESS_ID) SHIP_TO_ADDRESS_ID,
NVL(A.SHIP_TO_NAME_EXT,
B.SHIP_TO_NAME_EXT) SHIP_TO_NAME,
NVL(A.INTRMD_SHIP_TO_ID,
B.INTRMD_SHIP_TO_ID) INTRMD_SHIP_TO_ID,
NVL(A.CUSTOMER_ITEM_ID,
B.CUSTOMER_ITEM_ID) CUSTOMER_ITEM_ID,
--mci.customer_item_desc customer_item_desc,
NVL(A.INVENTORY_ITEM_ID,
B.INVENTORY_ITEM_ID) INVENTORY_ITEM_ID,
NVL(A.ITEM_DETAIL_SUBTYPE,
B.ITEM_DETAIL_SUBTYPE) ITEM_DETAIL_SUBTYPE,
FND1.MEANING DETAIL_SUBTYPE,
NVL(A.UOM_CODE,
B.UOM_CODE) UOM_CODE,
NVL(A.CUST_PO_NUMBER,
B.CUST_PO_NUMBER) CUST_PO_NUMBER,
NVL(A.INDUSTRY_ATTRIBUTE1,
B.INDUSTRY_ATTRIBUTE1) CUST_RECORD_YEAR,
A.ITEM_DETAIL_QUANTITY,
A.ITEM_DETAIL_TYPE,
FND2.MEANING NEW_DETAIL_TYPE,
B.ITEM_DETAIL_QUANTITY,
B.ITEM_DETAIL_TYPE,
FND3.MEANING OLD_DETAIL_TYPE
FROM RLM_SCHEDULE_LINES_ALL A,
(SELECT * FROM RLM_SCHEDULE_LINES_ALL b_in
WHERE TRUNC(b_in.START_DATE_TIME) >=
(SELECT TRUNC(SCHED_HORIZON_START_DATE)
FROM RLM_SCHEDULE_HEADERS
WHERE HEADER_ID = :P_NEW_HEADER_ID)
AND HEADER_ID = (SELECT header_id
FROM apps.rlm_schedule_headers_all
WHERE header_id =
(SELECT MAX(rsha.header_id)
FROM apps.rlm_schedule_headers_all rsha,
apps.rlm_schedule_lines_all rsla
WHERE rsha.customer_id = :p_customer_id
AND rsha.schedule_type = :p_schedule_type
AND rsla.inventory_item_id = b_in.inventory_item_id ---
AND rsla.org_id = rsha.org_id
AND (((rsla.cust_po_number = b_in.cust_po_number)AND
EXISTS (SELECT 'x'
FROM FND_LOOKUP_VALUES_VL FLV,
RA_CUSTOMERS RC
WHERE FLV.LOOKUP_TYPE = 'TEST_RLM_CHECK_CUST'
AND FLV.MEANING = RC.CUSTOMER_NAME
AND RC.CUSTOMER_ID = :P_CUSTOMER_ID))
OR
NOT EXISTS (SELECT 'x'
FROM FND_LOOKUP_VALUES_VL FLV,
RA_CUSTOMERS RC
WHERE FLV.LOOKUP_TYPE = 'TEST_RLM_CHECK_CUST'
AND FLV.MEANING = RC.CUSTOMER_NAME
AND RC.CUSTOMER_ID = :P_CUSTOMER_ID) )---
and rsha.header_id = rsla.header_id
and rsla.ship_from_org_id = :p_ship_from_org_id
AND rsha.ece_tp_location_code_ext = :p_ece_tp_location_code_ext
AND NVL(rsha.header_ref_value_1, '1') =
NVL(rsha.header_ref_value_1, '1')
AND rsha.header_id NOT IN
(SELECT header_id
FROM apps.rlm_schedule_headers_all
WHERE attribute1 = :p_request_id)))) B,
--rlm_schedule_headers c,
-- hr_organization_units hrorg,
--mtl_customer_items mci,
FND_LOOKUPS FND1,
FND_LOOKUPS FND2,
FND_LOOKUPS FND3
-- ra_addresses_all radd2,
-- ra_site_uses_all rsu2
WHERE A.HEADER_ID = :P_NEW_HEADER_ID
---- AND B.HEADER_ID(+) = :P_OLD_HEADER_ID
--a.header_id=c.header_id and
-- a.header_id = 803 and
-- b.header_id (+) = 804 and
AND B.CUSTOMER_ITEM_ID(+) = A.CUSTOMER_ITEM_ID
AND B.SHIP_TO_ORG_ID(+) = A.SHIP_TO_ORG_ID
AND B.SHIP_FROM_ORG_ID(+) = A.SHIP_FROM_ORG_ID
AND B.INVENTORY_ITEM_ID(+) = A.INVENTORY_ITEM_ID
AND NVL(B.INTRMD_SHIP_TO_ID(+),
NVL(A.INTRMD_SHIP_TO_ID,
0)) = NVL(A.INTRMD_SHIP_TO_ID,
0)
AND B.ITEM_DETAIL_SUBTYPE(+) = A.ITEM_DETAIL_SUBTYPE
AND B.UOM_CODE(+) = A.UOM_CODE
AND NVL(B.CUST_PO_NUMBER(+),
NVL(A.CUST_PO_NUMBER,
0)) = NVL(A.CUST_PO_NUMBER,
0)
AND B.ITEM_DETAIL_TYPE(+) < :P_ITEM_DETAIL_TYPE
AND A.ITEM_DETAIL_TYPE < :P_ITEM_DETAIL_TYPE
AND TRUNC(B.START_DATE_TIME(+)) = TRUNC(A.START_DATE_TIME)
AND FND1.LOOKUP_CODE = NVL(B.ITEM_DETAIL_SUBTYPE,
A.ITEM_DETAIL_SUBTYPE)
AND FND1.LOOKUP_TYPE = :P_RLM_DETAIL_SUBTYPE_CODE
AND A.ITEM_DETAIL_TYPE = FND2.LOOKUP_CODE
AND FND2.LOOKUP_TYPE = :P_RLM_DETAIL_TYPE_CODE
AND NVL(B.ITEM_DETAIL_TYPE,
'0') = FND3.LOOKUP_CODE
AND A.SHIP_FROM_ORG_ID = :P_SHIP_FROM_ORG_ID
AND B.SHIP_FROM_ORG_ID(+) = :P_SHIP_FROM_ORG_ID
AND FND3.LOOKUP_TYPE = :P_RLM_DETAIL_TYPE_CODE
&P_WHERE5 &P_WHERE3
-- CHANGES
&P_WHERE_DATE_BThe above query is related to the Oracle Release Management 11.5.10.2
The main header table is RLM_SCHEDULE_HEADERS_ALL which contains the information like schedule_reference_number and other details. In one schedule there can be many item records for different dates which are stored in the child table RLM_SCHEDULE_LINES_ALL. Both the tables are linked with HEADER_ID. Each schedule in header table has one horizon start date and horizon end date. Customer used to send these schedules every day for each item because of there business needs.
The requirement is to create a query to calculate the Net Change between the two schedules (Between the new and old). All the item records from child table for new schedule will be printed but only those item records from old schedule will be printed where schedule date in child table is within the horizon start date and end date of new schedule.
There are following indexes on the table RLM_SCHEDULE_LINES_ALL
IDX$$_199350001 Normal INVENTORY_ITEM_ID, SHIP_TO_ORG_ID, SHIP_FROM_NAME_EXT
IDX$$_199350002 Normal HEADER_ID, INVENTORY_ITEM_ID
RLM_SCHEDULE_LINE_CUSTOM Normal ITEM_DETAIL_TYPE, HEADER_ID
RLM_SCHEDULE_LINE_N1 Normal HEADER_ID, INTERFACE_LINE_ID
RLM_SCHEDULE_LINE_N2 Normal SHIP_FROM_ORG_ID, SHIP_TO_ORG_ID, CUSTOMER_ITEM_ID
RLM_SCHEDULE_LINE_N99 Normal INVENTORY_ITEM_ID
RLM_SCHEDULE_LINE_U1 Normal LINE_ID
XXRLM_RLM_SCHEDULE_LINES Normal SHIP_TO_ORG_ID, SHIP_FROM_NAME_EXT, PROCESS_STATUS, ITEM_DETAIL_TYPE, INVENTORY_ITEM_ID, CUSTOMER_ITEM_ID
Database Version: 11.1.0.7.0Optimizer Parameters:
SQL> show parameter optimizer
NAME TYPE VALUE
_optimizer_push_pred_cost_based boolean TRUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.1.0.6
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean FALSE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL>
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 8
SQL>
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL>
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL>
SQL> column sname format a20
SQL> column pname format a20
SQL> column pval2 format a20
SQL>
SQL>
SQL> SELECT SNAME,
2 PNAME,
3 PVAL1,
4 PVAL2
5 FROM SYS.AUX_STATS$;
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 03-30-2011 06:20
SYSSTATS_INFO DSTOP 03-30-2011 06:20
SYSSTATS_INFO FLAGS 0
SYSSTATS_MAIN CPUSPEEDNW 976.063
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
13 rows selected
SQL>Output of the explain plan will be in the next thread because of size constraint.Here is the output of explain plan
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
| Id | Operation | Name | R
| 0 | SELECT STATEMENT | |
| 1 | SORT UNIQUE | |
| 2 | UNION-ALL | |
|* 3 | FILTER | |
| 4 | NESTED LOOPS | |
| 5 | NESTED LOOPS | |
| 6 | NESTED LOOPS | |
|* 7 | HASH JOIN | |
| 8 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_LINES_ALL |
|* 9 | INDEX SKIP SCAN | RLM_SCHEDULE_LINE_CUSTOM |
|* 10 | HASH JOIN RIGHT OUTER | |
|* 11 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_LINES_ALL |
|* 12 | INDEX SKIP SCAN | RLM_SCHEDULE_LINE_CUSTOM |
| 13 | NESTED LOOPS | |
| 14 | NESTED LOOPS | |
| 15 | TABLE ACCESS BY INDEX ROWID | FND_LOOKUP_VALUES |
PLAN_TABLE_OUTPUT
|* 16 | INDEX RANGE SCAN | IDX$$_123E00001 |
|* 17 | INDEX RANGE SCAN | RLM_SCHEDULE_LINE_CUSTOM |
|* 18 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_LINES_ALL |
|* 19 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_HEADERS_ALL |
|* 20 | INDEX UNIQUE SCAN | RLM_SCHEDULE_HEADERS_U1 |
|* 21 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_HEADERS_ALL |
|* 22 | INDEX UNIQUE SCAN | RLM_SCHEDULE_HEADERS_U1 |
| 23 | TABLE ACCESS BY INDEX ROWID | FND_LOOKUP_VALUES |
|* 24 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U1 |
|* 25 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U1 |
| 26 | TABLE ACCESS BY INDEX ROWID | FND_LOOKUP_VALUES |
|* 27 | INDEX UNIQUE SCAN | RLM_SCHEDULE_HEADERS_U1 |
| 28 | SORT AGGREGATE | |
| 29 | NESTED LOOPS | |
| 30 | NESTED LOOPS | |
| 31 | NESTED LOOPS ANTI | |
|* 32 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_HEADERS_ALL |
|* 33 | INDEX RANGE SCAN | RLM_SCHEDULE_HEADERS_N3 |
|* 34 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_HEADERS_ALL |
|* 35 | INDEX UNIQUE SCAN | RLM_SCHEDULE_HEADERS_U1 |
|* 36 | INDEX RANGE SCAN | IDX$$_199350002 |
PLAN_TABLE_OUTPUT
|* 37 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_LINES_ALL |
| 38 | NESTED LOOPS | |
| 39 | NESTED LOOPS | |
| 40 | TABLE ACCESS BY INDEX ROWID | HZ_CUST_ACCOUNTS |
|* 41 | INDEX UNIQUE SCAN | HZ_CUST_ACCOUNTS_U1 |
| 42 | TABLE ACCESS BY INDEX ROWID | HZ_PARTIES | 5
|* 43 | INDEX UNIQUE SCAN | HZ_PARTIES_U1 |
|* 44 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U2 |
| 45 | NESTED LOOPS | |
| 46 | NESTED LOOPS | |
| 47 | TABLE ACCESS BY INDEX ROWID | HZ_CUST_ACCOUNTS |
|* 48 | INDEX UNIQUE SCAN | HZ_CUST_ACCOUNTS_U1 |
| 49 | TABLE ACCESS BY INDEX ROWID | HZ_PARTIES | 5
|* 50 | INDEX UNIQUE SCAN | HZ_PARTIES_U1 |
|* 51 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U2 |
| 52 | NESTED LOOPS | |
| 53 | NESTED LOOPS | |
| 54 | NESTED LOOPS | |
| 55 | NESTED LOOPS OUTER | |
| 56 | NESTED LOOPS | |
| 57 | TABLE ACCESS BY INDEX ROWID | FND_LOOKUP_VALUES |
PLAN_TABLE_OUTPUT
|* 58 | INDEX RANGE SCAN | IDX$$_123E00001 |
|* 59 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_LINES_ALL |
|* 60 | INDEX RANGE SCAN | RLM_SCHEDULE_LINE_CUSTOM |
|* 61 | VIEW PUSHED PREDICATE | |
|* 62 | FILTER | |
|* 63 | FILTER | |
|* 64 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_LINES_ALL |
|* 65 | INDEX RANGE SCAN | IDX$$_199350001 |
|* 66 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_HEADERS_ALL |
|* 67 | INDEX UNIQUE SCAN | RLM_SCHEDULE_HEADERS_U1 |
|* 68 | INDEX UNIQUE SCAN | RLM_SCHEDULE_HEADERS_U1 |
| 69 | SORT AGGREGATE | |
| 70 | NESTED LOOPS | |
| 71 | NESTED LOOPS | |
| 72 | NESTED LOOPS ANTI | |
|* 73 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_HEADERS_ALL |
|* 74 | INDEX RANGE SCAN | RLM_SCHEDULE_HEADERS_N3 |
|* 75 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_HEADERS_ALL |
|* 76 | INDEX UNIQUE SCAN | RLM_SCHEDULE_HEADERS_U1 |
|* 77 | INDEX RANGE SCAN | IDX$$_199350002 |
|* 78 | TABLE ACCESS BY INDEX ROWID | RLM_SCHEDULE_LINES_ALL |
PLAN_TABLE_OUTPUT
| 79 | NESTED LOOPS | |
| 80 | NESTED LOOPS | |
| 81 | TABLE ACCESS BY INDEX ROWID| HZ_CUST_ACCOUNTS |
|* 82 | INDEX UNIQUE SCAN | HZ_CUST_ACCOUNTS_U1 |
| 83 | TABLE ACCESS BY INDEX ROWID| HZ_PARTIES | 5
|* 84 | INDEX UNIQUE SCAN | HZ_PARTIES_U1 |
|* 85 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U2 |
| 86 | NESTED LOOPS | |
| 87 | NESTED LOOPS | |
| 88 | TABLE ACCESS BY INDEX ROWID| HZ_CUST_ACCOUNTS |
|* 89 | INDEX UNIQUE SCAN | HZ_CUST_ACCOUNTS_U1 |
| 90 | TABLE ACCESS BY INDEX ROWID| HZ_PARTIES | 5
|* 91 | INDEX UNIQUE SCAN | HZ_PARTIES_U1 |
|* 92 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U2 |
| 93 | TABLE ACCESS BY INDEX ROWID | FND_LOOKUP_VALUES |
|* 94 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U1 |
|* 95 | INDEX RANGE SCAN | FND_LOOKUP_VALUES_U1 |
| 96 | TABLE ACCESS BY INDEX ROWID | FND_LOOKUP_VALUES |
Predicate Information (identified by operation id):
PLAN_TABLE_OUTPUT
3 - filter("HEADER_ID"= (SELECT "HEADER_ID" FROM "APPS"."RLM_SCHEDULE_HEADERS
"RLM_SCHEDULE_HEADERS_ALL" WHERE "HEADER_ID"= (SELECT MAX("RSHA"."
"APPS"."RLM_SCHEDULE_LINES_ALL" "RSLA","APPS"."RLM_SCHEDULE_HEADER
"RSHA","APPS"."RLM_SCHEDULE_HEADERS_ALL" "RLM_SCHEDULE_HEADERS_ALL
"RSHA"."HEADER_ID"="HEADER_ID" AND TO_NUMBER("ATTRIBUTE1")=1090072
"RSHA"."ECE_TP_LOCATION_CODE_EXT"='AG-60989' AND "RSHA"."CUSTOMER_
"RSHA"."SCHEDULE_TYPE"='PLANNING_RELEASE' AND NVL("RSHA"."HEADER_R
"RSLA"."INVENTORY_ITEM_ID"=:B1 AND "RSHA"."HEADER_ID"="RSLA"."HEAD
"RSLA"."SHIP_FROM_ORG_ID"=2904 AND ("RSLA"."CUST_PO_NUMBER"=:B2 AN
"AR"."HZ_CUST_ACCOUNTS" "CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APP
WHERE "B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=US
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742) OR NOT EXISTS (SELECT 0 FROM
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742)) AND "RSLA"."ORG_ID"="RSHA"."
7 - access("B_IN"."CUSTOMER_ITEM_ID"="CUSTOMER_ITEM_ID")
9 - access("HEADER_ID"=1197995)
PLAN_TABLE_OUTPUT
filter("HEADER_ID"=1197995)
10 - access("A"."CUSTOMER_ITEM_ID"(+)="B_IN"."CUSTOMER_ITEM_ID" AND
"A"."SHIP_TO_ORG_ID"(+)="B_IN"."SHIP_TO_ORG_ID" AND
"A"."SHIP_FROM_ORG_ID"(+)="B_IN"."SHIP_FROM_ORG_ID" AND
"A"."INVENTORY_ITEM_ID"(+)="B_IN"."INVENTORY_ITEM_ID" AND
"A"."ITEM_DETAIL_SUBTYPE"(+)="B_IN"."ITEM_DETAIL_SUBTYPE" AND "A".
AND TRUNC(INTERNAL_FUNCTION("A"."START_DATE_TIME"(+)))=TRUNC(INTER
IME")))
filter(NVL("A"."INTRMD_SHIP_TO_ID"(+),NVL("B_IN"."INTRMD_SHIP_TO_ID",0))=
SHIP_TO_ID",0) AND NVL("A"."CUST_PO_NUMBER"(+),NVL("B_IN"."CUST_PO
O_NUMBER",'0'))
11 - filter("A"."SHIP_FROM_ORG_ID"(+)=2904)
12 - access("A"."HEADER_ID"(+)=1197995)
filter("A"."HEADER_ID"(+)=1197995 AND TO_NUMBER("A"."ITEM_DETAIL_TYPE"(+)
16 - access("LOOKUP_TYPE"='RLM_DETAIL_TYPE_CODE' AND "VIEW_APPLICATION_ID"=0 A
"LANGUAGE"=USERENV('LANG'))
filter("SECURITY_GROUP_ID"="FND_GLOBAL"."LOOKUP_SECURITY_GROUP"("LV"."LOO
W_APPLICATION_ID"))
17 - access("LOOKUP_CODE"="B_IN"."ITEM_DETAIL_TYPE")
filter(TO_NUMBER("B_IN"."ITEM_DETAIL_TYPE")<3)
18 - filter("B_IN"."SHIP_FROM_ORG_ID"=2904 AND TRUNC(INTERNAL_FUNCTION("B_IN".
PLAN_TABLE_OUTPUT
>= (SELECT TRUNC(INTERNAL_FUNCTION("SCHED_HORIZON_START_DATE")) FR
"RLM"."RLM_SCHEDULE_HEADERS_ALL" "RLM_SCHEDULE_HEADERS_ALL" WHERE
NVL("ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1
',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99)))=NVL(TO_NUMBE
INFO'),1,1),' ',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99))
TRUNC(INTERNAL_FUNCTION("B_IN"."START_DATE_TIME"))<= (SELECT
TRUNC(INTERNAL_FUNCTION("SCHED_HORIZON_END_DATE")) FROM "RLM"."RLM
"RLM_SCHEDULE_HEADERS_ALL" WHERE "HEADER_ID"=1197995 AND
NVL("ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1
',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99)))=NVL(TO_NUMBE
INFO'),1,1),' ',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99))
19 - filter(NVL("ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1
',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99)))=NVL(TO_NUMBE
INFO'),1,1),' ',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99))
20 - access("HEADER_ID"=1197995)
21 - filter(NVL("ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1
',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99)))=NVL(TO_NUMBE
INFO'),1,1),' ',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99))
22 - access("HEADER_ID"=1197995)
24 - access("LOOKUP_TYPE"='RLM_DETAIL_SUBTYPE_CODE' AND "VIEW_APPLICATION_ID"=
"LOOKUP_CODE"=NVL("A"."ITEM_DETAIL_SUBTYPE","B_IN"."ITEM_DETAIL_SU
PLAN_TABLE_OUTPUT
"LANGUAGE"=USERENV('LANG'))
filter("LANGUAGE"=USERENV('LANG') AND "SECURITY_GROUP_ID"="FND_GLOBAL"."L
P"("LV"."LOOKUP_TYPE","LV"."VIEW_APPLICATION_ID"))
25 - access("LOOKUP_TYPE"='RLM_DETAIL_TYPE_CODE' AND "VIEW_APPLICATION_ID"=0 A
"LOOKUP_CODE"=NVL("A"."ITEM_DETAIL_TYPE",'0') AND "LANGUAGE"=USERE
filter("LANGUAGE"=USERENV('LANG') AND "SECURITY_GROUP_ID"="FND_GLOBAL"."L
P"("LV"."LOOKUP_TYPE","LV"."VIEW_APPLICATION_ID"))
27 - access("HEADER_ID"= (SELECT MAX("RSHA"."HEADER_ID") FROM "APPS"."RLM_SCHE
"RSLA","APPS"."RLM_SCHEDULE_HEADERS_ALL" "RSHA","APPS"."RLM_SCHEDU
"RLM_SCHEDULE_HEADERS_ALL" WHERE "RSHA"."HEADER_ID"="HEADER_ID" AN
TO_NUMBER("ATTRIBUTE1")=109007290 AND "RSHA"."ECE_TP_LOCATION_CODE
"RSHA"."CUSTOMER_ID"=64742 AND "RSHA"."SCHEDULE_TYPE"='PLANNING_RE
NVL("RSHA"."HEADER_REF_VALUE_1",'1') IS NOT NULL AND "RSLA"."INVEN
"RSHA"."HEADER_ID"="RSLA"."HEADER_ID" AND "RSLA"."SHIP_FROM_ORG_ID
("RSLA"."CUST_PO_NUMBER"=:B2 AND EXISTS (SELECT 0 FROM "AR"."HZ_C
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742) OR NOT EXISTS (SELECT 0 FROM
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
PLAN_TABLE_OUTPUT
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742)) AND "RSLA"."ORG_ID"="RSHA"."
32 - filter("RSHA"."CUSTOMER_ID"=64742 AND "RSHA"."SCHEDULE_TYPE"='PLANNING_RE
NVL("RSHA"."HEADER_REF_VALUE_1",'1') IS NOT NULL)
33 - access("RSHA"."ECE_TP_LOCATION_CODE_EXT"='AG-60989')
34 - filter(TO_NUMBER("ATTRIBUTE1")=109007290)
35 - access("RSHA"."HEADER_ID"="HEADER_ID")
36 - access("RSHA"."HEADER_ID"="RSLA"."HEADER_ID" AND "RSLA"."INVENTORY_ITEM_I
37 - filter("RSLA"."SHIP_FROM_ORG_ID"=2904 AND ("RSLA"."CUST_PO_NUMBER"=:B1 AN
0 FROM "AR"."HZ_CUST_ACCOUNTS" "CUST_ACCT","AR"."HZ_PARTIES" "PART
"B" WHERE "B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742) OR NOT EXISTS (SELECT 0 FROM
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742)) AND "RSLA"."ORG_ID"="RSHA"."
41 - access("CUST_ACCT"."CUST_ACCOUNT_ID"=64742)
43 - access("CUST_ACCT"."PARTY_ID"="PARTY"."PARTY_ID")
44 - access("B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."MEANING"=SUBSTRB("
AND "B"."LANGUAGE"=USERENV('LANG'))
PLAN_TABLE_OUTPUT
filter("B"."LANGUAGE"=USERENV('LANG') AND "B"."MEANING"=SUBSTRB("PARTY_NA
48 - access("CUST_ACCT"."CUST_ACCOUNT_ID"=64742)
50 - access("CUST_ACCT"."PARTY_ID"="PARTY"."PARTY_ID")
51 - access("B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."MEANING"=SUBSTRB("
AND "B"."LANGUAGE"=USERENV('LANG'))
filter("B"."LANGUAGE"=USERENV('LANG') AND "B"."MEANING"=SUBSTRB("PARTY_NA
58 - access("LOOKUP_TYPE"='RLM_DETAIL_TYPE_CODE' AND "VIEW_APPLICATION_ID"=0 A
"LANGUAGE"=USERENV('LANG'))
filter("SECURITY_GROUP_ID"="FND_GLOBAL"."LOOKUP_SECURITY_GROUP"("LV"."LOO
W_APPLICATION_ID"))
59 - filter("A"."SHIP_FROM_ORG_ID"=2904)
60 - access("A"."ITEM_DETAIL_TYPE"="LOOKUP_CODE" AND "A"."HEADER_ID"=1197995)
filter(TO_NUMBER("A"."ITEM_DETAIL_TYPE")<3)
61 - filter(NVL("B"."INTRMD_SHIP_TO_ID"(+),NVL("A"."INTRMD_SHIP_TO_ID",0))=NVL
O_ID",0) AND "B"."ITEM_DETAIL_SUBTYPE"(+)="A"."ITEM_DETAIL_SUBTYPE
"B"."UOM_CODE"(+)="A"."UOM_CODE" AND NVL("B"."CUST_PO_NUMBER"(+),N
("A"."CUST_PO_NUMBER",'0') AND TRUNC(INTERNAL_FUNCTION("B"."START_
NCTION("A"."START_DATE_TIME")))
62 - filter("HEADER_ID"= (SELECT "HEADER_ID" FROM "APPS"."RLM_SCHEDULE_HEADERS
"RLM_SCHEDULE_HEADERS_ALL" WHERE "HEADER_ID"= (SELECT MAX("RSHA"."
"APPS"."RLM_SCHEDULE_LINES_ALL" "RSLA","APPS"."RLM_SCHEDULE_HEADER
PLAN_TABLE_OUTPUT
"RSHA","APPS"."RLM_SCHEDULE_HEADERS_ALL" "RLM_SCHEDULE_HEADERS_ALL
"RSHA"."HEADER_ID"="HEADER_ID" AND TO_NUMBER("ATTRIBUTE1")=1090072
"RSHA"."ECE_TP_LOCATION_CODE_EXT"='AG-60989' AND "RSHA"."CUSTOMER_
"RSHA"."SCHEDULE_TYPE"='PLANNING_RELEASE' AND NVL("RSHA"."HEADER_R
"RSLA"."INVENTORY_ITEM_ID"=:B1 AND "RSHA"."HEADER_ID"="RSLA"."HEAD
"RSLA"."SHIP_FROM_ORG_ID"=2904 AND ("RSLA"."CUST_PO_NUMBER"=:B2 AN
"AR"."HZ_CUST_ACCOUNTS" "CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APP
WHERE "B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=US
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742) OR NOT EXISTS (SELECT 0 FROM
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742)) AND "RSLA"."ORG_ID"="RSHA"."
63 - filter("A"."SHIP_FROM_ORG_ID"=2904)
64 - filter("B_IN"."CUSTOMER_ITEM_ID"="A"."CUSTOMER_ITEM_ID" AND
"B_IN"."SHIP_FROM_ORG_ID"="A"."SHIP_FROM_ORG_ID" AND TO_NUMBER("B_
TRUNC(INTERNAL_FUNCTION("B_IN"."START_DATE_TIME"))>= (SELECT
TRUNC(INTERNAL_FUNCTION("SCHED_HORIZON_START_DATE")) FROM "RLM"."R
"RLM_SCHEDULE_HEADERS_ALL" WHERE "HEADER_ID"=1197995 AND
NVL("ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1
PLAN_TABLE_OUTPUT
',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99)))=NVL(TO_NUMBE
INFO'),1,1),' ',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99))
65 - access("B_IN"."INVENTORY_ITEM_ID"="A"."INVENTORY_ITEM_ID" AND
"B_IN"."SHIP_TO_ORG_ID"="A"."SHIP_TO_ORG_ID")
66 - filter(NVL("ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1
',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99)))=NVL(TO_NUMBE
INFO'),1,1),' ',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),(-99))
67 - access("HEADER_ID"=1197995)
68 - access("HEADER_ID"= (SELECT MAX("RSHA"."HEADER_ID") FROM "APPS"."RLM_SCHE
"RSLA","APPS"."RLM_SCHEDULE_HEADERS_ALL" "RSHA","APPS"."RLM_SCHEDU
"RLM_SCHEDULE_HEADERS_ALL" WHERE "RSHA"."HEADER_ID"="HEADER_ID" AN
TO_NUMBER("ATTRIBUTE1")=109007290 AND "RSHA"."ECE_TP_LOCATION_CODE
"RSHA"."CUSTOMER_ID"=64742 AND "RSHA"."SCHEDULE_TYPE"='PLANNING_RE
NVL("RSHA"."HEADER_REF_VALUE_1",'1') IS NOT NULL AND "RSLA"."INVEN
"RSHA"."HEADER_ID"="RSLA"."HEADER_ID" AND "RSLA"."SHIP_FROM_ORG_ID
("RSLA"."CUST_PO_NUMBER"=:B2 AND EXISTS (SELECT 0 FROM "AR"."HZ_C
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742) OR NOT EXISTS (SELECT 0 FROM
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
PLAN_TABLE_OUTPUT
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742)) AND "RSLA"."ORG_ID"="RSHA"."
73 - filter("RSHA"."CUSTOMER_ID"=64742 AND "RSHA"."SCHEDULE_TYPE"='PLANNING_RE
NVL("RSHA"."HEADER_REF_VALUE_1",'1') IS NOT NULL)
74 - access("RSHA"."ECE_TP_LOCATION_CODE_EXT"='AG-60989')
75 - filter(TO_NUMBER("ATTRIBUTE1")=109007290)
76 - access("RSHA"."HEADER_ID"="HEADER_ID")
77 - access("RSHA"."HEADER_ID"="RSLA"."HEADER_ID" AND "RSLA"."INVENTORY_ITEM_I
78 - filter("RSLA"."SHIP_FROM_ORG_ID"=2904 AND ("RSLA"."CUST_PO_NUMBER"=:B1 AN
0 FROM "AR"."HZ_CUST_ACCOUNTS" "CUST_ACCT","AR"."HZ_PARTIES" "PART
"B" WHERE "B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742) OR NOT EXISTS (SELECT 0 FROM
"CUST_ACCT","AR"."HZ_PARTIES" "PARTY","APPLSYS"."FND_LOOKUP_VALUES
"B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."LANGUAGE"=USERENV(
"B"."MEANING"=SUBSTRB("PARTY_NAME",1,50) AND "CUST_ACCT"."PARTY_ID
"CUST_ACCT"."CUST_ACCOUNT_ID"=64742)) AND "RSLA"."ORG_ID"="RSHA"."
82 - access("CUST_ACCT"."CUST_ACCOUNT_ID"=64742)
84 - access("CUST_ACCT"."PARTY_ID"="PARTY"."PARTY_ID")
85 - access("B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."MEANING"=SUBSTRB("
PLAN_TABLE_OUTPUT
AND "B"."LANGUAGE"=USERENV('LANG'))
filter("B"."LANGUAGE"=USERENV('LANG') AND "B"."MEANING"=SUBSTRB("PARTY_NA
89 - access("CUST_ACCT"."CUST_ACCOUNT_ID"=64742)
91 - access("CUST_ACCT"."PARTY_ID"="PARTY"."PARTY_ID")
92 - access("B"."LOOKUP_TYPE"='ETN_RLM_CHECK_CUST' AND "B"."MEANING"=SUBSTRB("
AND "B"."LANGUAGE"=USERENV('LANG'))
filter("B"."LANGUAGE"=USERENV('LANG') AND "B"."MEANING"=SUBSTRB("PARTY_NA
94 - access("LOOKUP_TYPE"='RLM_DETAIL_SUBTYPE_CODE' AND "VIEW_APPLICATION_ID"=
"LOOKUP_CODE"=NVL("B"."ITEM_DETAIL_SUBTYPE","A"."ITEM_DETAIL_SUBTY
"LANGUAGE"=USERENV('LANG'))
filter("LANGUAGE"=USERENV('LANG') AND "SECURITY_GROUP_ID"="FND_GLOBAL"."L
P"("LV"."LOOKUP_TYPE","LV"."VIEW_APPLICATION_ID"))
95 - access("LOOKUP_TYPE"='RLM_DETAIL_TYPE_CODE' AND "VIEW_APPLICATION_ID"=0 A
"LOOKUP_CODE"=NVL("B"."ITEM_DETAIL_TYPE",'0') AND "LANGUAGE"=USERE
filter("LANGUAGE"=USERENV('LANG') AND "SECURITY_GROUP_ID"="FND_GLOBAL"."L
P"("LV"."LOOKUP_TYPE","LV"."VIEW_APPLICATION_ID"))
Note
- 'PLAN_TABLE' is old version
313 rows selectedPlease suggest me how can I work on the query part to improve the performance.
Thanks
Vishalaksha -
Need help in performance tunning
Hi , i have one update statement , where it is keep on running for hours and the volume of the data is 2.2 million
version:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
below is the code :
DECLARE
Cursor C11
Is
Select Account_Num,Outlet_Num,Product_Number,Ln_Of_Biz,Generateguid('DELIVERED_PRODUCT') As Dp_Guid From (
Select Account_Num,Outlet_Num,Product_Number,Ln_Of_Biz
From transformation_flat
Group By Account_Num, Outlet_Num,Ln_Of_Biz,Product_Number
Having Count(*)> 1);
Type Actno Is Table Of Varchar2(13) Index By Binary_Integer;
Type Outlet Is Table Of NUMBER Index By Binary_Integer;
Type Pno Is Table Of VARCHAR2(255) INDEX BY BINARY_INTEGER;
Type Tn Is Table Of VARCHAR2(10) Index By Binary_Integer;
Type Vdpguid Is Table Of VARCHAR2(20) Index By Binary_Integer;
Type Vcnt Is Table Of Number Index By Binary_Integer;
Type Lob1 Is Table Of Varchar2(255) Index By Binary_Integer;
Type Offer_No Is Table Of Varchar2(255) Index By Binary_Integer;
V_Actno Actno;
V_Outlet Outlet;
V_Pno Pno;
V_Tn Tn;
V_DPGUID VDPGUID;
Vguid Varchar2(20);
V_Cnt Vcnt;
V_Lob Lob1;
V_Offer_No Offer_No;
BEGIN
Open c11;
Loop
Fetch C11 Bulk Collect Into V_Actno,V_Outlet,V_Pno,V_Lob,V_Dpguid;
Exit When C11%Notfound;
End Loop;
close c11;
Forall I In 1..V_Actno.count
Update transformation_flat Set Product_Guid=V_Dpguid(I) Where
Account_Num=V_Actno(I) And
Outlet_Num=V_Outlet(I) And
Product_Number=V_Pno(I) And
ln_of_biz=v_lob(I);
Commit;
END;
for above i do have index on that table on (account_num,outlet_num,product_number,ln_of_biz).
when i checked the memory contents for this sqlid in v$sql , below are the values :
Disk_Read:21640650
Buffer_Gets:22466856
Concurrency_Wait_Time:16923
Cluster_Wait_Time:36313694
user_io_wait_time:3594365433
I need some inputs in which area i can tune the above code..
Thanks835589 wrote:
hi i am also face same performance issue pls reply me ASApDon't use the word ASAP, it is rude and a violation of forum terms and conditions.
http://www.oracle.com/html/terms.html
>
4. Use of Community Services
Community Services are provided as a convenience to users and Oracle is not obligated to provide any technical support for, or participate in, Community Services. While Community Services may include information regarding Oracle products and services, including information from Oracle employees, they are not an official customer support channel for Oracle.
You may use Community Services subject to the following: (a) Community Services may be used solely for your personal, informational, noncommercial purposes; (b) Content provided on or through Community Services may not be redistributed; and (c) personal data about other users may not be stored or collected except where expressly authorized by Oracle
>
These people are for ASAP requests.
http://www.google.com/search?q=oracle+consultant
where i need to tune the queery.
pls i am eagarly waiting for that
Read and understand the links posted above
RPuttagunta wrote:
HOW TO: Post a SQL statement tuning request - template posting
When your query takes too long ... -
How application module helps for performance improve
Hi Everyone,
I have a sample web-application in which I am connecting with single AM instance (AM for database view object), retrieving some information and then close the connection. I am doing this as,
// making AM instance
<application module instance> = Configuration.createRootApplicationModule(<AM name>, config);
// performing operations
<operation result> = <application module instance>.<access VO with any operation>();
System.out.println("Get result here");
// disconnecting AM instance
<application module instance>.getDBTransaction().disconnect();
Configuration.releaseRootApplicationModule(<application module instance>, true);
These are the activities which are performed by a single user. Now, I am doing stress test on same activities. I am testing the same code with 300 concurrent users (using JMeter with JSP URL). These are working fine. Also I checked multiple times, it always working fine.
Now, I need to do something through which I can improve the performance. I know, I can use AM pool configurations to make this more effective. I have gone through the Oracle documents and checked the same test case with default or recommended pool configurations and I found similar kind of results (there is not much difference).
On other hand, I tried with 'releaseRootApplicationModule' method with false parameter and found better results in default as well as recommended pool configurations.
My question is, is the change of pool configurations recommended by Oracle really work? or do I need to concentrate more on coding part with default pool configurations?
Here, I would like to know, what are the best practice (in code as well as pool configurations), I need to follow if I really want to improve the performance in real scenarios (when our application will access with large no. of concurrent users).
I really look forward some help from experts. I have given a lot of time on this to know how really we can make our application more effective in terms of performance.
I really appreciate for your reply.
Regards,
Dilip Gupta.>
We added the createRootApplicationModule() API (in the oracle.jbo.client.Configuration class) to simplify acquiring an application module from the pool for brief programmatic manipulation before it is released back to the AM pool.
Steve Muench.
>
check [url http://radio-weblogs.com/0118231/2009/08/20.html#a959]Check Your App for Misuse of Configuration.createRootApplicationModule()
Edited by: Mohammad Jabr on May 10, 2012 7:14 AM -
Hi all:
I'm new to the world of i-tunes. I just bought a $14 i-tune album, and it won't work
on my MP3 player because, as it turns out, the songs are in MPEG4 format?
Can I solve this somehow? Or can I get a refund from i-tunes to get my money back?
Thanks for your help!Click here for information.
(61900) -
Help with Performance tunning PL/SQL
Hi All,
I have a PL/SQL procedure, it works fine. No errors, and no bugs. However its taking forever to finish. I am using the concatenation operator (||), and I know its expensive. How can I improve performance to the procedure ?
Here is the code
create or replace
PROCEDURE POST_ADDRESS_CLEANSE AS
CURSOR C1 IS
SELECT Z.ROW_ID,
Z.NAME
FROM STGDATA.ACCOUNT_SOURCE Z;
CURSOR C2 IS
SELECT DISTINCT CLEANSED_NAME || CLEANSED_STREET_ADDRESS ||
CLEANSED_STREET_ADDRESS_2 || CLEANSED_CITY || CLEANSED_STATE ||
CLEANSED_POSTAL_CODE AS FULLRECORD
FROM STGDATA.ACCOUNT_SOURCE_CLEANSED;
V_ROWID Number := 1;
V_FLAG VARCHAR2(30);
TEMP_ROW_ID VARCHAR2(10) := NULL;
BEGIN
-- This loop will update CLEANSED_NAME column in ACCOUNT_SOURCE_CLEANSED table.
FOR X IN C1 LOOP
TEMP_ROW_ID := TO_CHAR(X.ROW_ID);
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED A
SET A.CLEANSED_NAME = X.NAME
WHERE A.ROW_ID = TEMP_ROW_ID;
COMMIT;
END LOOP;
-- This loop will update columns EM_PRIMARY_FLAG, EM_GROUP_ID in ACCOUNT_SOURCE_CLEANSED table
FOR Y IN C2 LOOP
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED
SET EM_GROUP_ID = V_ROWID
WHERE CLEANSED_NAME || CLEANSED_STREET_ADDRESS || CLEANSED_STREET_ADDRESS_2 ||
CLEANSED_CITY || CLEANSED_STATE || CLEANSED_POSTAL_CODE = Y.FULLRECORD;
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED
SET EM_PRIMARY_FLAG = 'Y'
WHERE CLEANSED_NAME || CLEANSED_STREET_ADDRESS || CLEANSED_STREET_ADDRESS_2 ||
CLEANSED_CITY || CLEANSED_STATE || CLEANSED_POSTAL_CODE = Y.FULLRECORD
AND ROWNUM = 1;
V_ROWID := V_ROWID + 1;
COMMIT;
END LOOP;
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED
SET EM_PRIMARY_FLAG = 'N'
WHERE EM_PRIMARY_FLAG IS NULL;
COMMIT;
--dbms_output.put_line('V_ROW:'||V_ROWID);
--dbms_output.put_line('CLEANSED_NAME:'||Y.FULLRECORD);
END POST_ADDRESS_CLEANSE;
Thanks in advance.
Message was edited by: Rooney -- added code using syntax highlightI was able to modify my code a bit, however I don't see a way of not using loops.
In the loop, I am updating 2 columns. EM_PRIMARY_FLAG, and EM_GROUP_ID. The data I am working with has duplicate records, and that is why I am using a distinct in the cursor. The requirements are is to make one record a primary record, and the rest are reference records. What makes my record primary is updating column EM_PRIMARY_FLAG with a 'Y', and updating EM_GROUP_ID with a number combines all duplicate records into a group.
In the procedure, I am getting the distinct records, looping through each one, and then doing 2 updates:
1 - Update EM_PRIMARY_FLAG to 'Y' where rownum = 1, this will set one record to be primary
2 - Update EM_GROUP_ID to a number (V_ROWID := V_ROWID + 1) where V_ROWID starts from 1, to group all records into a set.
Here is my latest code after modifying it:
create or replace
PROCEDURE POST_ADDRESS_CLEANSE AS
CURSOR C1 IS
SELECT DISTINCT NVL(CLEANSED_NAME, '') AS NAME_CLEANSED,
NVL(CLEANSED_STREET_ADDRESS, '') AS ADDRESS_CLEANSED,
NVL(CLEANSED_STREET_ADDRESS_2, '') AS ADDRESS2_CLEANSED,
NVL(CLEANSED_CITY, '') AS CITY_CLEANSED,
NVL(CLEANSED_STATE, '') AS STATE_CLEANSED,
NVL(CLEANSED_POSTAL_CODE, '') AS POSTAL_CODE_CLEANSED
FROM STGDATA.ACCOUNT_SOURCE_CLEANSED;
V_ROWID Number := 1;
V_FLAG VARCHAR2(30);
TEMP_ROW_ID VARCHAR2(10) := NULL;
BEGIN
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED A
SET A.CLEANSED_NAME = (SELECT Z.NAME
FROM STGDATA.ACCOUNT_SOURCE Z
WHERE Z.ROW_ID = (SELECT TO_NUMBER(B.ROW_ID)
FROM STGDATA.ACCOUNT_SOURCE_CLEANSED B
WHERE B.ROW_ID = A.ROW_ID));
COMMIT;
-- This loop will update columns EM_PRIMARY_FLAG, EM_GROUP_ID in ACCOUNT_SOURCE_CLEANSED table
FOR Y IN C1 LOOP
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED
SET EM_GROUP_ID = V_ROWID
WHERE CLEANSED_NAME = Y.NAME_CLEANSED
AND CLEANSED_STREET_ADDRESS = Y.ADDRESS_CLEANSED
AND CLEANSED_STREET_ADDRESS_2 = Y.ADDRESS2_CLEANSED
AND CLEANSED_CITY = Y.CITY_CLEANSED
AND CLEANSED_STATE = Y.STATE_CLEANSED
AND CLEANSED_POSTAL_CODE = Y.POSTAL_CODE_CLEANSED;
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED
SET EM_PRIMARY_FLAG = 'Y'
WHERE CLEANSED_NAME = Y.NAME_CLEANSED
AND CLEANSED_STREET_ADDRESS = Y.ADDRESS_CLEANSED
AND CLEANSED_STREET_ADDRESS_2 = Y.ADDRESS2_CLEANSED
AND CLEANSED_CITY = Y.CITY_CLEANSED
AND CLEANSED_STATE = Y.STATE_CLEANSED
AND CLEANSED_POSTAL_CODE = Y.POSTAL_CODE_CLEANSED
AND ROWNUM = 1;
V_ROWID := V_ROWID + 1;
END LOOP;
COMMIT;
UPDATE STGDATA.ACCOUNT_SOURCE_CLEANSED
SET EM_PRIMARY_FLAG = 'N'
WHERE EM_PRIMARY_FLAG IS NULL;
COMMIT;
END POST_ADDRESS_CLEANSE;
Thanks
Message was edited by: Rooney - Just added the code in SQL block using syntax highlight. -
Oracle Analyzer or Some thing else ?(for performance & tunning)
Hi
Any body have idea about the tool Oracle Analyzer for performanace & tuning,i heard about this but i couldn't find any sort of documentation on this tool any where.Did this change
from Oracle Analyzer to Some thing else?.
Please help in this regard
Thanks
Sreenidear sreenivasa kanneganti,
this is the script to analyze the table and compute statistics
cheers
ANALYZE TABLE USER_NAME.TABLE_NAME COMPUTE STATISTICS
from what I know statistics are used by the Oracle Optimizer
(if it is set in CHOOSE mode, it is written in the init.ora)
which stores these statistics in a dictionary of data
If you want to check the integrity of data you have to use the clause VALIDATE_STRUCTURE
Of course you have to have the grant to ANALIZE_ANY
Remember to run the ANALYZE and COMPUTE STATISTICS at the end of
the day, this because it takes a long time to run... ;-)
If you want to ANALIZE a complete schema you should use the
procedure DBMS_UTILITY.ANALIZE_SCHEMA
cheers
rjh -
Asking help for performance issues about concurrent package
One of my friends is developing a service based on resin. They use thread pool of current package in jdk1.5. The service will create a lot of threads in the thread pool. And most of the threads are waiting. What they can not make sure is how the large amount of waiting threads will affect the performance. These threads surely will occupy a lot of memory. But how will they affect the cpu?
Some documents on the Internet say that the large amount of waiting threads will largely increase the thread switching overhead. And some others say no because the scheduler will not be affected by waiting threads. I'm not sure which one is true. Would anyone like to give me some tips? It's better if you can point out any our documents about it.
Thanks!No, it just depends on Data Structures 101.
You would have a list of ready threads, from which you would allocate one to the processor on some priority and fairness scheme, and another list of non-ready threads which you would only promote to the ready list when something happened to them that made them ready.
And among the ready threads you would most likely use a priority queue, so that operations on it were O(log(N)). And if the ready list also included the unready list for some strange reason, operations on it would still be O(log(N)), i.e. less than linear in the total number of threads.
And if for some strange reason it was implemented in a less efficient way than that, I would complain vociferously to the vendor. Scheduling has been going on for fifty years after all. -
Hi,
Millions of records are there in this order table and it takes hours to run the below query
update orders
set s_last_name = decode(s_last_name, null, null, (select last_name from cust where cust_id = orders.cust_id)),
credit_card = null;
Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
UPDATE STATEMENT | | 35M| 1388M| 319K (3)| 01:03:55 |
UPDATE | ORDERS | | | | |
PARTITION RANGE ALL | | 35M| 1388M| 319K (3)| 01:03:55 |
TABLE ACCESS FULL | ORDERS | 35M| 1388M| 319K (3)| 01:03:55 |
TABLE ACCESS BY GLOBAL INDEX ROWID | CUST | 1 | 14 | 3 (0) | 00:00:01 |
INDEX RANGE SCAN | CUST_PK| 1 | | 2 (0) | 00:00:01 |
is it possible to write in a different way to improve the performance.. thanks. BcjYou're running an update with an uncorrelated subquery. These can be horrifically slow. You generally have 2 options:
1. Correlated subquery
2. Do the update inside a loop. #1 if possible will probably be faster
1. Correlated subquery looks something like
update table A
setl (column1, column2) = (select column1, column2
from table2
where table2.key = A.key
)which might be faster, if the lookup table is properly indexed on the correlated column
2. Update in loop looks something like
for record in (key, select column1, column2 from table)loop
update table2
set column1 = record.column1, column2 = record.column2
where table2.key = record.key
end loop;which may be faster than the original update (or may not). This method has the advantage of allowing periodic commits; people who say you should never do periodic commits have never blown out rollback segments. If you must use the loop method commit at least 4k rows (more rows per commit is better). -
Query optimizaing for performance tune
Hi guys,
The below query is taking a lot of time to execute.The main problem is with table S022.This table is going for full table scan everytime even if we give a lot of selection criteria.So is there any alternate table for S022.In selection screen the mandatory fields are Location,plant and Phase.
SELECT a~aufnr "Order number
e~arbpl "Work center
e~plnum "Plaaned order
b~objnr "Object number
a~werks "plant
c~charg "Batch
d~gamng "qty
d~gmein "UOM
d~plnbez "Material
d~aufpl "routing no
d~aprio "Order priority
d~fevor "Responsible planner group/department
f~aufpl "Routing no
f~aplzl "general counter
f~vornr "Phase
f~arbid "workcenter
f~ltxa1 "text
g~objty "Object type
g~stand " Location
INTO CORRESPONDING FIELDS OF TABLE t_afpo
FROM ( ( ( ( ( s022 AS e
INNER JOIN aufk AS a ON aaufnr = eaufnr )
INNER JOIN jest AS b ON aobjnr = bobjnr )
INNER JOIN afpo AS c ON caufnr = aaufnr
AND awerks = cdwerk )
INNER JOIN afko AS d ON daufnr = caufnr
INNER JOIN afvc AS f ON faufpl = daufpl
AND fvornr = evornr )
INNER JOIN crhd AS g ON garbpl = earbpl
AND gobjid = farbid )
WHERE a~werks IN s_werks
AND d~plnbez IN s_matnr
AND d~fevor IN s_fevor
AND e~arbpl IN s_arbpl
AND e~aufnr IN s_aufnr
AND a~auart IN r_auart
AND e~ssavd IN s_date
AND e~vornr IN s_vornr
AND g~stand IN s_stand
AND a~loekz NE 'X'
AND b~stat = c_i0002
AND b~inact = space.Hi,
i would suggest that dont put too many joins in the select statement..
if possible try to put mulitple select statements using "for all entries".
and also join the table only with key fields so that the data fetching will be more faster..
if you are not able to use the key fields try with index fields provided by SAP..
if that is also not working then create Zindex field for the table which is using more time to fetch the data.
Regards
JK -
Is there any link for Performance Tunning Learning .
sinha
Please go through this link .
it has like a book
step by step
<a href="http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_Introduction.asp">http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_Introduction.asp</a>
Reward points if it is usefull,...
Girish -
Abap Logic for performance tuning not working when using Internal tables
Hi,
I wrote this piece of code that is working correctly that is select SUM of cost from DSO where Plant is the same for Sales Items.
LOOP AT RESULT_PACKAGE INTO rp.
SELECT SUM( /N/S_STRDCOST ) FROM /N/ADSP_DPIT00 INTO
rp-/N/S_STRDCOST
WHERE /N42/S_SALESITEM = rp-/N42/S_ITEMID AND /N42/S_PLPLANT EQ
rp-/N42/S_SOURCE.
MODIFY RESULT_PACKAGE FROM rp.
Clear rp.
ENDLOOP.
Now I try to rewrite it for performance tunning using internal table but I am getting 0 values. can't figure out whats the problem and been struggling fixing it.
TYPES : begin of ty_DSO_TABLE,
/N42/S_STRDCOST TYPE /N/ADSP_DSPC00-/N/S_STRDCOST,
/N42/S_ITEMID TYPE /N/ADSP_DSPC00-/N/S_ITEMID,
end of ty_DSO_TABLE.
DATA: it_DSO_TABLE type hashed table of ty_DSO_TABLE with unique key
/N/S_ITEMID,
wa_DSO_TABLE type ty_DSO_TABLE.
Field-symbols: <rp> TYPE tys_TG_1.
LOOP AT RESULT_PACKAGE assigning <rp>.
clear wa_DSO_TABLE.
Read table IT_DSO_TABLE into wa_DSO_TABLE with table key /N/S_ITEMID
= <rp>-/N/S_ITEMID.
if sy-subrc ne 0.
select SUM( /N/S_STRDCOST ) into CORRESPONDING
FIELDS OF wa_DSO_TABLE from
/N/ADSP_DPIT00 WHERE /N/S_SALESITEM = <rp>-/N/S_ITEMID AND
/N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
if sy-subrc eq 0.
<rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
endif.
endif.
ENDLOOP.
Any idea whats wrong with the code
thanksHi Vaidya,
According to the code which you have written, there is no value in table IT_DSO_TABLE when you are trying to read the values.And after the read statement you have given a condition for sy-subrc. Hence the select statement is actually not even getting executed. *Also you have not assigned the final value back to the ResultPackage.*_
So Kindly correct your code as follows:
Data: wa_dso type ty_DSO_TABLE.
LOOP AT RESULT_PACKAGE assigning <rp>.
clear wa_DSO_TABLE.
select SUM( /N/S_STRDCOST ) into CORRESPONDING
FIELDS OF wa_DSO_TABLE from
/N/ADSP_DPIT00 WHERE /N/S_SALESITEM = <rp>-/N/S_ITEMID AND
/N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
if sy-subrc eq 0.
<rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
MODIFY RESULT_PACKAGE FROM <rp>.
endif.
ENDLOOP.
Hope this helps you.
Regards,
Satyam -
Dear Experts,
I am executing a query which is build on a Multiprovider. The execution time is approx. 12 mins, again if I enable a dimension to analyze it takes another 15 mins.
The technical details of the query are:
1) The multiprovider fetches data from three different Cubes.
2) It contains three diff characteristics out of which one is having a 10 level hierarchy and one is having a 2 level hierarchy. Both the hierarchies are externally maintained.
3) It contains KPIs which calculate the sales on diff time lines such as CM MTD, LM MTD, CY YTD, LY YTD with the help of a customer exit.
4) It converts the quatities in alt unit of measures through an exit.
Kindly suggest for performance tunning. How shall i achieve min query execution time??
-KushalHI Kushal,
effective query on MP can be found
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b03b7f4c-c270-2910-a8b8-91e0f6d77096
for nw2004s
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a9ab011a-0e01-0010-02a1-d496b94c9c0f
modeling on multiprovider
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2f5aa43f-0c01-0010-a990-9641d3d4eef7
docs on performance available in
FAQ - The Future of SAP NetWeaver Business Intelligence in the Light of the NetWeaver BI&Business Objects Roadmap
https://service.sap.com/bi
-> performance
Also,
check the parallel processing setting, your query is non cumulative ...
629541 Multiprovider: Parallel Processing
911939 Optimization hint for logical MultiProvider partitioning
907881 MultiProvider with (too) many part providers
Performance of non-cumulative queries in MultiProviders
903559 MultiProvider optimization is only partially active
942554 Perf when working with BI inp help with multiprov on Oracle
607164 MultiProvider: Sequential processing is faster than parallel
913975 Performance problems for MultiProviders with many partprov.
hope this helps
Best Regards,
VVenkat..
Maybe you are looking for
-
when i execute dbcheck in db13, i receive this message: ORA-00600: internal error code, arguments: [25012], [19], [21], [], [], [], [], [] i have Oracle 9.2.0 and i don't find any note in the OSS notes.
-
How to find KPI used in which query
Hi All , I have around 10 KPI's. I want to know in which queries these KPI's are used. How can I check that ? Thanks Prateek
-
Networ Interfaces in preferences.plist
Hi Community, there are more than one network interfaces called "Ethernet 1" in /Library/Preferences/SystemConfiguration/preferences.plist with different settings. The interfaces seems to be handled by a unique Hex Code. Some of these interfaces are
-
I forgot my password and now i'm locked out. how can i fix this problem?
i forgot my password and now im locked out. how can i fix this problem?
-
RAC install on windows 2003 EE, intel xeon processor (x64)
hello After i install clusterware i try run runcluvfy stage -pre dbinst -n rac2,rac4 -r 10gR2 on "checking node application existance..." get The application has failed to start becouse MSVCR71.DLL was not found. Re-installing the application may fix