Analysis and Performance tuning of a query
Hi gurus,
We have few reports built on multiprovider (which is containing five basic cubes) whose response time is very slow, so i want to do some analysis to find out why they are runing very slow and also do the performance tuning.
So where do i start and how do i start like is it from Report or multiprovider
if its report or multiprovider please kindly guide me what are the things do i need to look for and how to correct them whether adding something or changing the data design.
i have four reports
1. is runing on three basic cubes
2. is runing on all the five cubes
3.& 4. runing on 2 cubes
so kindly give your inputs
thanks and regards
Neel
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
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
hope this helps.
Similar Messages
-
Regarding Indexes and performance tuning.
Hi Everyone,
I need some elaborate explanation about indexes and performance tuning.
1. How do you find out whether the select query which I write is utilizing the indexes .
2. Is it true that the sequence in which the indexes are defined in se11
for eg: MANDT
KNUMH
KOPOS
your select query should also have the same sequence in the where clause else the indexes are not utilized well .
3. Is there any precautions/ special method to write select queries for proper utilization of indexes.
Thanks to all reading and answering in advance.
Rgds,
Anu.Hi
You will find like this
If your select like this
select matnr mtart from mara into<itab>
where matnr = <>..
Go to table and see mara ..if matnr is checked as primary key,then you are using primary index.
Check secondary index tab and see if any fields,if those fields you are using in select then you are using secondary index.
2.Not sequence,check how many fields are checked tick as primary key,all thsoe are index.
3.Always try to use proper primary index in select statment and avoid nested select statements.
Thanks -
Siebel Upgrade and Performance Tuning On Oracle 11g Training At Oracle Open
Hi All,
If you are interested in attending a Siebel Upgrade and Performance Tuning for Oracle 11g please let me know. We are planning to offer this course during the same week as OOW in San Francisco. For anyone who can’t attend in person we are planning to offer a net meeting with a dial in.
This education is offered to actual Siebel customers.
R
Robert Ponder
Lead Architect and Director
Ponder Pro Serve
cell: 770.490.2767
fax: 770.412.8259
email: [email protected]
web: www.ponderproserve.comHi All,
If you are interested in attending a Siebel Upgrade and Performance Tuning for Oracle 11g please let me know. We are planning to offer this course during the same week as OOW in San Francisco. For anyone who can’t attend in person we are planning to offer a net meeting with a dial in.
This education is offered to actual Siebel customers.
R
Robert Ponder
Lead Architect and Director
Ponder Pro Serve
cell: 770.490.2767
fax: 770.412.8259
email: [email protected]
web: www.ponderproserve.com -
What are the best practices for Database management and performance tuning?
Hello,
I want to ensure that I am using the best practices for managing and maintaining our Database.
Is there any documentation out there that outlines how to maintain and ensure top performance out of our database?
Thank you!
John SeftonI appreciate the responses, however this is not the information I am looking for.
I am specificaly looking for best practices invloving the managment and performance tuning.
Example: are their tools that I can install that will monitor the size and response time of the database and alert me if there is degradation in performance?
Are there specific periodic activities I should be doing to garuntee that my database will continue to function that way it is supposed to?
Or is this a fire and forget solution that does not need this attention? -
Calculating the memory and performance of a oracle query
Hi,
I am now developing application in java with oracle as a back-end. In my application i require lot of queries to be executed. Hence, the system is getting is slow due to queries.
So, i planned to develop one Stand-alone application in java, that should show the statistics like, memory and performance. for ex:- if i enter one SQL query in the text box, my standalone application should display, the processing time it requires to fetch the values and the memory is used for that query.
Can anybody give ideas, suggestion, etc etc...
Thanks in Advance
Regards,
RajkumarThis is now Oracle question, not JDBC question. :)
Followings are sample for explain plan/autotrace/SQL*Trace.
(You really need to read stuffs like Oracle SQL Tuning books...)
SQL> create table a as select object_id, object_name from all_objects
2 where rownum <= 100;
Table created.
SQL> create index a_idx on a(object_id);
Index created.
SQL> exec dbms_stats.gather_table_stats(user,'A');
SQL> explain plan for select from a where object_id = 1;*
Explained.
SQL> select from table(dbms_xplan.display());*
PLAN_TABLE_OUTPUT
Plan hash value: 3632291705
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
PLAN_TABLE_OUTPUT
| 0 | SELECT STATEMENT | | 1 | 11 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| A | 1 | 11 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | A_IDX | 1 | | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
2 - access("OBJECT_ID"=1)
SQL> set autot on
SQL> select * from a where object_id = 1;
no rows selected
Execution Plan
Plan hash value: 3632291705
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 11 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| A | 1 | 11 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | A_IDX | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("OBJECT_ID"=1)
Statistics
1 recursive calls
0 db block gets
1 consistent gets
0 physical reads
0 redo size
395 bytes sent via SQL*Net to client
481 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed
SQL> exec dbms_monitor.session_trace_enable(null,null,true,true);
-- SQL> alter session set events '10046 trace name context forever, level 12';
-- SQL> alter session set sql_trace = true;
PL/SQL procedure successfully completed.
SQL> select * from a where object_id = 1;
no rows selected
* SQL> exec dbms_monitor.session_trace_disable(null, null);*
-- SQL> alter session set events '10046 trace name context off';
-- SQL> alter session set sql_trace = false;
PL/SQL procedure successfully completed.
SQL> show parameter user_dump_dest
*/home/oracle/admin/WASDB/udump*
SQL>host
JOSS:oracle:/home/oracle:!> cd /home/oracle/admin/WASDB/udump
JOSS:oracle:/home/oracle/admin/WASDB/udump:!> ls -lrt
-rw-r----- 1 oracle dba 2481 Oct 11 16:38 wasdb_ora_21745.trc
JOSS:oracle:/home/oracle/admin/WASDB/udump:!> tkprof wasdb_ora_21745.trc trc.out
TKPROF: Release 10.2.0.3.0 - Production on Thu Oct 11 16:40:44 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
JOSS:oracle:/home/oracle/admin/WASDB/udump:!> vi trc.out
select *
from
a where object_id = 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 1 0 0
total 3 0.00 0.00 0 1 0 0
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 55
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID A (cr=1 pr=0 pw=0 time=45 us)
0 INDEX RANGE SCAN A_IDX (cr=1 pr=0 pw=0 time=39 us)(object id 65441)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 25.01 25.01
Hope this helps -
Performance tuning for JCDS query
Hi All,
I have a performance issue in following query.Any Idea how can it be improved?
SELECT objnr udate utime
FROM jcds
INTO TABLE it_jcds
WHERE objnr LIKE c_or
AND stat = l_tj02t
AND cdtcode LIKE c_co
AND inact = space.
Fields Distinct values
CDTCODE 111
INACT 192
Only one index i.e Primary Index
UNIQUE Index JCDS~0 (Compute)
Column Name #Distinct
MANDT 3
OBJNR 2.165.245
STAT 100
CHGNR 319
Is 'like' statement causing the performance issue and how can it be corrected?
Or Index can be created for this?You can try this: Create 2 ranges, for objnr and cdtcode and fill like:
ra_objnr-sign = 'I'.
ra_objnr-option = 'CP'.
ra_objnr-low = 'OR*'.
append ra_objnr.
ra_code-sign = 'I'.
ra_code-option = 'CP'.
ra_code-low = 'CO*'.
append ra_code.
SELECT objnr udate utime
FROM jcds
INTO TABLE it_jcds
WHERE objnr IN ra_objnr
AND stat = l_tj02t
AND cdtcode IN ra_code
AND inact = space
Regards,
John. -
Performance tuning for ABAP Query (created from t-cd SQ01)
Hello all,
We created ABAP Query report from transaction SQ01.
But the generated report has an appropriate SQL statement which causes performance problem.
To solve this issue, I guess the easiest way is;
0. Give up to use it.
1. Copy it to another object in the customer namespace.
2. Ajust SQL statement.
But I'm wondering if there're appropriate ways to adjust SQL statement of Query.
Could anybody give me any better idea?
Thank you
YukoYou can try this: Create 2 ranges, for objnr and cdtcode and fill like:
ra_objnr-sign = 'I'.
ra_objnr-option = 'CP'.
ra_objnr-low = 'OR*'.
append ra_objnr.
ra_code-sign = 'I'.
ra_code-option = 'CP'.
ra_code-low = 'CO*'.
append ra_code.
SELECT objnr udate utime
FROM jcds
INTO TABLE it_jcds
WHERE objnr IN ra_objnr
AND stat = l_tj02t
AND cdtcode IN ra_code
AND inact = space
Regards,
John. -
Performance tuning in SQL query using join of views
Hi,
Am trying to tune a query of the format
select ........ from view1,view2
where view1.keyfield = view2.keyfield
The base tables of the views view1 and view2 have indexes specified on 'keyfield'.
However, when I do an explain plan of the query, Full table scan of those base tables are performed.
Even tried using Hints in this query to force Oracle to use those indexes, but still not successful.
Any pointers on how to tune this kind of query would be highly welcome.
Regards,
BaishIf your query is really of the same form as you posted, then full table scans then a hash or merge join may be the most efficient plan.
You are asking for all of the rows from view1 and the matching rows from view2, because of this, Oracle dedcided that the cost of full table scans using multi-block reads is cheaper than using single block reads to get the rowids from the index, then single block reads to get the rows from the table.
FULL SCAN <> BAD
John -
Performance tuning for the query
CURSOR c_exercise_list IS
SELECT
DECODE(v_mfd_mask_id ,'Y',' ',o.opt_id) opt_id,
DECODE(v_mfd_mask_id ,'Y',' ',o.soc_sec) soc_sec,
P.plan_id plan_id, E.exer_id exer_id, E.exer_num,
DECODE(G.sar_flag, 0, DECODE(G.plan_type, 0, '1', 1, '2', 2, '3', 3, ' ', 4,'5', 5, '6', 6, '7', 7, '8', 8, '9', '0'), ' ') option_type,
TO_CHAR(G.grant_dt, 'YYYYMMDD') grant_dt, TO_CHAR(E.exer_dt, 'YYYYMMDD') exer_dt,
E.opts_exer opts_exer,
E.mkt_prc mkt_prc,
E.swap_prc swap_prc,
E.shrs_swap shrs_swap, decode(e.exer_type,2,decode(xe.cash_partial,'Y','A','2'),TO_CHAR(E.exer_type)) exer_type,
E.sar_shrs sar_shrs,
NVL(ROUND(((xe.sar_shrs_withld_optcost - (e.opts_exer * g.opt_prc) / e.mkt_prc) * e.mkt_prc),2),0)+e.sar_cash sar_cash,
NVL(f.fixed_fee1,0) fixed_fee1,
NVL(f.fixed_fee2,0) fixed_fee2,
NVL(f.fixed_fee3,0) fixed_fee3,
NVL(f.commission,0) commission,
NVL(f.sec_fee,0) sec_fee,
NVL(f.fees_paid,0) fees_paid,
NVL(ct.amount,0) cash_tend,
E.shrs_tend shrs_tend, G.grant_id grant_id, NVL(G.grant_cd, ' ') grant_cd,
NVL(xg.child_symbol,' ') child_symbol,
NVL(xg.opt_gain_deferred_flag,'N') defer_flag,
o.opt_num opt_num,
--XO.new_ssn,
DECODE(v_mfd_mask_id ,'Y',' ',xo.new_ssn) new_ssn,
xo.use_new_ssn
,xo.tax_verification_eligible tax_verification_eligible
,(SELECT TO_CHAR(MIN(settle_dt),'YYYYMMDD') FROM tb_ml_exer_upload WHERE exer_num = E.exer_num AND user_id=E.user_id AND NVL(settle_dt,TO_DATE('19000101','YYYYMMDD'))>=E.exer_dt) AS settle_dt
,xe.rsu_type AS rsu_type
,xe.trfbl_det_name AS trfbl_det_name
,o.user_txt1,o.user_txt2,xo.user_txt3,xo.user_txt4,xo.user_txt5,xo.user_txt6,xo.user_txt7
,xo.user_txt8,xo.user_txt9,xo.user_txt10,xo.user_txt11,
xo.user_txt12,
xo.user_txt13,
xo.user_txt14,
xo.user_txt15,
xo.user_txt16,
xo.user_txt17,
xo.user_txt18,
xo.user_txt19,
xo.user_txt20,
xo.user_txt21,
xo.user_txt22,
xo.user_txt23,
xo.user_dt2,
xo.adj_dt_hire_vt_svc,
xo.adj_dt_hire_vt_svc_or,
xo.adj_dt_hire_vt_svc_or_dt,
xo.severance_plan_code,
xo.severance_begin_dt,
xo.severance_end_dt,
xo.retirement_bridging_dt
,NVL(xg.pu_var_price ,0) v_pu_var_price
,NVL(xe.ficamed_override,'N') v_ficmd_ovrride
,NVL(xe.vest_shrs,0) v_vest_shrs
,NVL(xe.client_exer_id,' ') v_client_exer_id
,(CASE WHEN xg.re_tax_flag = 'Y' THEN pk_xop_reg_outbound.Fn_GetRETaxesWithheld(g.grant_num, E.exer_num, g.plan_type)
ELSE 'N'
END) re_tax_indicator -- 1.5V
,xe.je_bypass_flag
,xe.sar_shrs_withld_taxes --Added for SAR july 2010 release
,xe.sar_shrs_withld_optcost --Added for SAR july 2010 release
FROM
(SELECT exer.* FROM exercise exer WHERE NOT EXISTS (SELECT s.exer_num FROM suspense s
WHERE s.exer_num = exer.exer_num AND s.user_id = exer.user_id AND exer.mkt_prc = 0))E,
grantz G, xop_grantz xg, optionee o, xop_optionee xo, feeschgd f, cashtendered ct, planz P,xop_exercise xe
WHERE
E.grant_num = G.grant_num
AND E.user_id = G.user_id
AND E.opt_num = o.opt_num
AND E.user_id = o.user_id
AND (G.grant_num = xg.grant_num(+) AND G.user_id=xg.user_id(+))
AND (o.opt_num = xo.opt_num(+) AND o.user_id=xo.user_id(+))
AND E.plan_num = P.plan_num
AND E.user_id = P.user_id
AND E.exer_num = f.exer_num(+)
AND E.user_id = ct.user_id(+)
AND E.exer_num = ct.exer_num(+)
AND E.user_id = ct.user_id(+)
AND E.exer_num=xe.exer_num(+)
AND E.user_id=xe.user_id(+)
AND G.user_id = USER
AND NOT EXISTS (
SELECT tv.exer_num
FROM tb_xop_tax_verification tv--,exercise ex
WHERE tv.exer_num = e.exer_num
AND tv.user_id = e.user_id
AND tv.user_id = v_cms_user
AND tv.status_flag IN (0,1,3,4, 5)) -- Not Processed
;how to tune the query to impropve the performance, any1 help me ..thanks in advance
Edited by: BluShadow on 21-Feb-2013 08:14
corrected {noformat}{noformat} tags. Please read {message:id=9360002} and learn how to post code correctly.i got CPU cost: 458.50 Elapsed time: 1542.90 so anything can tune to improve the performance, but there is no full table scan applied for none of the mentioned table. . and most of the columns are unique index scan takes place.. anybody can help me to find the solution
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 Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Edited by: 956684 on Feb 22, 2013 4:09 AM -
I am working on fine tuning below query.
SELECT SEGMENT1
FROM MTL_SYSTEM_ITEMS
WHERE ORGANIZATION_ID = 100
AND INVENTORY_ITEM_ID = :a
MTL_SYSTEM_ITEMS have 8 million records. This query is in a function that gets called probably a million times a day.
What I am thinking to do is to create a view on mtl_system_items table where organization_id = 100. Now if I use the below view, do you think the query will execute faster?
SELECT SEGMENT1
FROM MTL_SYSTEM_ITEMS_VIEW
WHERE INVENTORY_ITEM_ID = :aCheck your numbers of parsing for these particular query after each execution.
e.g,
SQL>SELECT * FROM(
2 SELECT parse_calls*executions Product, parse_calls Parses
3 ,executions Execs, sql_text FROM v$sqlarea ORDER BY 1 DESC)
4 WHERE ROWNUM <= 50
5* ORDER BY parses DESC
SQL> /
PRODUCT PARSES EXECS SQL_TEXT
2608960 155 16832 SELECT apl_dnum ,COUNT(*) "Numbers" ,SUM(q3d_amount) "Amount" ,ddate FRO
7661664 111 69024 SELECT COUNT(*) FROM Q3_LODGMENT_DTL WHERE APL_DNUM = :b1
1412853 51 27703 SELECT ZONE_DESC_SHORT FROM ZONE_STP WHERE ZONE_CODE = :b1
50 rows selected.If yours session_cached_cursors parameter have the capibilty to caching more SQL statements per session then it will reduce re-parsing.Though bind variables in
SQL code reduce parsing.
Check yours index exist,check out yours network flow,yours DBA gave you very nice job but there is no hard and fast thumb role to identify exactly what causes to degrade this specific query.
Khurram -
Business Process Management - End-to-End Analysis and Performance KPI's
Hello,
I am from WB and were looking to expand our footprint with Business Process Monitoring.
For critical business processes (order to cash, release to accounting, procure to pay; create shopping cart, etc.) how can be map and determine for the business units the expected run times as well as capturing / reporting historical trend analysis; looking at from a company business process level and not an SAP transaction level.
We were disappointed that we were unable to find this detailed functionality in SolMan (dashboards, metrics, customizable reports, etc.) that could tell us how long a WB business process takes to execute form start to finish.
Does anyone have any info as to if NetWeaver BPM can capture and trend the complete A-Z run times of a Business Process?
Iu2019m I missing something here?! I would think something this basic would automatically be a part of SolMan BPM Monitoringu2026
Appreciate all and any feedback.
Thanks!
Bruce L.
Warner Bros. Pictures, Burbank Calif.Hi Bruce,
You can find many of the Process Analytics capabilities in NW BPM 7.2 release in this How-to Webinar
FEATURED EVENTS
Here you can see the Process Analytics related documentation
http://help.sap.com/saphelp_nwce72/helpdata/en/60/794d3f1e5a4443b5f714b28f6f5fa1/frameset.htm
Here you can find what data is exposed within the BPM specific BI content http://help.sap.com/saphelp_nw70/helpdata/en/ec/d897e16ccd4efd951a5fe708734bd3/frameset.htm
Best regards,
Radost -
Performance tuning of sql query with multiple joins
My query takes at least half an hour to execute and the number of records returned are approx 1 lakh records.
Structure of tables are:
tblSession : ID,option1,option2,option3,option4,option5,option6,option7,option8,option9.
tblOption : ID, labelID
tblLabelDetail : ID, LABELID, text
optionID 1 to optionID9 are Foreign keys to table tblOption.ID
My query is as below :
select
session.ID
,session.tstamp
,session.score
,session.hid1
,session.hID2
,session.hID3
,session.collectionID
,session.consumerID
,session.langID
,cons_cust.text1 as customCons_text1,
cons_cust.text2 as customCons_text2,
cons_cust.text3 as customCons_text3,
cons_cust.text4 as customCons_text4,
cons_cust.text5 as customCons_text5,
cons_cust.text6 as customCons_text6,
cons_cust.text7 as customCons_text7,
cons_cust.text8 as customCons_text8,
cons_cust.text9 as customCons_text9,
ld_cons1.text as customCons_option1GUID,
ld_cons2.text as customCons_option2GUID,
ld_cons3.text as customCons_option3GUID,
ld_cons4.text as customCons_option4GUID ,
ld_cons5.text as customCons_option5GUID,
ld_cons6.text as customCons_option6GUID,
ld_cons7.text as customCons_option7GUID,
ld_cons8.text as customCons_option8GUID,
ld_cons9.text as customCons_option9GUID,
--session
session_cust.text1 as session_cust_text1,
session_cust.text2 as session_cust_text2,
session_cust.text3 as session_cust_text3,
session_cust.text4 as session_cust_text4,
session_cust.text5 as session_cust_text5,
session_cust.text6 as session_cust_text6,
session_cust.text7 as session_cust_text7,
session_cust.text8 as session_cust_text8,
session_cust.text9 as session_cust_text9,
ld_sess1.text as session_cust_option1GUID,
ld_sess2.text as session_cust_option2GUID,
ld_sess3.text as session_cust_option3GUID,
ld_sess4.text as session_cust_option4GUID,
ld_sess5.text as session_cust_option5GUID,
ld_sess6.text as session_cust_option6GUID,
ld_sess7.text as session_cust_option7GUID,
ld_sess8.text as session_cust_option8GUID,
ld_sess9.text as session_cust_option9GUID,
session_cust.tStamp1,
session_cust.tStamp2
from mvSession session with (noexpand)
inner join tblCollection c on c.ID=session.collectionID AND c.templateID = 405
left join tblConsumer cons on cons.ID=session.consumerID and cons.sessionYM between 601 and 1412 and cons.sID=105
left join vCustomConsumer cons_cust on cons_cust.sessionYM between 601 and 1412 and cons_cust.sID=105 and cons_cust.ID=cons.ID
left join tbloption o_cons1 on o_cons1.id = cons_cust.option1 and o_cons1.sid = 105
left join tblLabelDetail ld_cons1 on ld_cons1.labelID = o_cons1.labelID and ld_cons1.langId = 1 and ld_cons1.eid = 107
left join tbloption o_cons2 on o_cons2.id = cons_cust.option2 and o_cons2.sid = 105
left join tblLabelDetail ld_cons2 on ld_cons2.labelID = o_cons2.labelID and ld_cons2.langId = 1 and ld_cons2.eid = 107
left join tbloption o_cons3 on o_cons3.id = cons_cust.option3 and o_cons3.sid = 105
left join tblLabelDetail ld_cons3 on ld_cons3.labelID = o_cons1.labelID and ld_cons3.langId = 1 and ld_cons3.eid = 107
left join tbloption o_cons4 on o_cons4.id = cons_cust.option4 and o_cons4.sid = 105
left join tblLabelDetail ld_cons4 on ld_cons4.labelID = o_cons4.labelID and ld_cons4.langId = 1 and ld_cons4.eid = 107
left join tbloption o_cons5 on o_cons5.id = cons_cust.option5 and o_cons5.sid = 105
left join tblLabelDetail ld_cons5 on ld_cons5.labelID = o_cons5.labelID and ld_cons5.langId = 1 and ld_cons5.eid = 107
left join tbloption o_cons6 on o_cons6.id = cons_cust.option6 and o_cons6.sid = 105
left join tblLabelDetail ld_cons6 on ld_cons6.labelID = o_cons6.labelID and ld_cons6.langId = 1 and ld_cons6.eid = 107
left join tbloption o_cons7 on o_cons7.id = cons_cust.option7 and o_cons7.sid = 105
left join tblLabelDetail ld_cons7 on ld_cons7.labelID = o_cons7.labelID and ld_cons7.langId = 1 and ld_cons7.eid = 107
left join tbloption o_cons8 on o_cons8.id = cons_cust.option8 and o_cons8.sid = 105
left join tblLabelDetail ld_cons8 on ld_cons8.labelID = o_cons8.labelID and ld_cons8.langId = 1 and ld_cons8.eid = 107
left join tbloption o_cons9 on o_cons9.id = cons_cust.option9 and o_cons9.sid = 105
left join tblLabelDetail ld_cons9 on ld_cons9.labelID = o_cons9.labelID and ld_cons9.langId = 1 and ld_cons9.eid = 107
left join vCustomSession session_cust on session_cust.sessionYM between 601 and 1412 and session_cust.sID=105 and session_cust.ID=session.ID
left join tbloption o_sess1 on o_sess1.id = session_cust.option1 and o_sess1.sid = 105
left join tblLabelDetail ld_sess1 on ld_sess1.labelID = o_sess1.labelID and ld_sess1.langId = 1 and ld_sess1.eid = 107
left join tbloption o_sess2 on o_sess2.id = session_cust.option2 and o_sess2.sid = 105
left join tblLabelDetail ld_sess2 on ld_sess2.labelID = o_sess2.labelID and ld_sess2.langId = 1 and ld_sess2.eid = 107
left join tbloption o_sess3 on o_sess2.id = session_cust.option3 and o_sess3.sid = 105
left join tblLabelDetail ld_sess3 on ld_sess3.labelID = o_sess2.labelID and ld_sess3.langId = 1 and ld_sess3.eid = 107
left join tbloption o_sess4 on o_sess4.id = session_cust.option4 and o_sess4.sid = 105
left join tblLabelDetail ld_sess4 on ld_sess4.labelID = o_sess4.labelID and ld_sess4.langId = 1 and ld_sess4.eid = 107
left join tbloption o_sess5 on o_sess5.id = session_cust.option5 and o_sess5.sid = 105
left join tblLabelDetail ld_sess5 on ld_sess5.labelID = o_sess5.labelID and ld_sess5.langId = 1 and ld_sess5.eid = 107
left join tbloption o_sess6 on o_sess6.id = session_cust.option6 and o_sess6.sid = 105
left join tblLabelDetail ld_sess6 on ld_sess6.labelID = o_sess6.labelID and ld_sess6.langId = 1 and ld_sess6.eid = 107
left join tbloption o_sess7 on o_sess7.id = session_cust.option7 and o_sess7.sid = 105
left join tblLabelDetail ld_sess7 on ld_sess7.labelID = o_sess7.labelID and ld_sess7.langId = 1 and ld_sess7.eid = 107
left join tbloption o_sess8 on o_sess8.id = session_cust.option8 and o_sess8.sid = 105
left join tblLabelDetail ld_sess8 on ld_sess8.labelID = o_sess8.labelID and ld_sess8.langId = 1 and ld_sess8.eid = 107
left join tbloption o_sess9 on o_sess9.id = session_cust.option9 and o_sess9.sid = 105
left join tblLabelDetail ld_sess9 on ld_sess9.labelID = o_sess9.labelID and ld_sess9.langId = 1 and ld_sess9.eid = 107
where session.sID=105 and session.tStamp >= 'Sep 1 2014 12:00AM' and session.tStamp < 'Dec 12 2014 12:00AM'
order by session.tStamp, session.ID
Is there a way , where i can simplify the joins with tbloption and tblLabelDetail and get my o/p in optimal time.
RegardsI have headed towards another approach ie. using unpivot and then pivot.
First i am converting option1-option9 into column , then doing PIVOT to get back the same record . But issue is that when i am doing pivoting i am getting NULL values.
My query is :
select * into #t1 from
select ID
, option1
, option2
, option3
, option4
, option5
, option6
, option7
, option8
, option9
from vCustomConsumer
where sid=105
and sessionYM = 1412
) SourceTable
UNPIVOT
optionID FOR Col IN
(option1
,option2
,option3
,option4
,option5
,option6
,option7
,option8
,option9 )
) AS unpvt
select t.ID,t.optionID,t.col,cast(ld.text as varchar(max)) as text into #t2
from #t1 t
left outer join tbloption o on o.ID = t.optionID
left outer join tblLabelDetail ld on ld.labelID = o.labelID and ld.langID=1
order by ID,col
select ID,option1
,option2
,[option3]
,option4
,option5
,option6
,option7
,option8
,option9
from
select ID,optionID,col,text
from #t2
)up
pivot
min(text)for col in
(option1
,option2
,[option3]
,option4
,option5
,option6
,option7
,option8
,option9
)as pvt
In my last query where i am using pivot, i am getting NULL values. When i check the data in temp table #t2 , it exists perfectly . But when pivoting i dont understand why it is returning most of the NULL values. I am getting data for only one column in single
row.
Below are some rows from result set finally obtained after pivoting :
ID
option1
option2
option3
option4
option5
option6
option7
option8
option9
62949026
NULL
0 to 200 seconds
NULL
NULL
NULL
NULL
NULL
NULL
NULL
62966000
NULL
NULL
4
NULL
NULL
NULL
NULL
NULL
NULL
62966032
NULL
NULL
4
NULL
NULL
NULL
NULL
NULL
NULL
63090372
NULL
NULL
NULL
NULL
EN
NULL
NULL
NULL
NULL
63090375
NULL
NULL
NULL
NULL
EN
NULL
NULL
NULL
NULL
Thanks, -
Performance tuning of a query in Hyperion Interactive Reporting Studio.
Hi All,
Cud some one please tell me... what are the possible ways that one can enhance the performance of the query in Hyperion interactive Reporting studio.. ??
Thanks & Regards,
RajTopic Order Priority...Data Model Options
Use Hints/Directives
Ask DBA to review the SQL Generated by IR --- TopMenu - View - Query Log -
Issue with performance tuning of a query
Hi,
I have a query which is in the below format
select a.* from
(inline query) a,
(inline query b)
where a.id = b.id;
Now i want the inline query b to be executed first and then joined with a.
How can i achieve the same.
Let me know if more information is required.h4. NO_MERGE - This will allow inline query executing first
h4. LEADING(b) and USE_NL(b a) - We want to make driving table as "b" and then nest loop with "a"
SELECT /*+ LEADING(b) USE_NL(b a) */ a.*
FROM (SELECT /*+ NO_MERGE */ LEVEL ID FROM dual CONNECT BY LEVEL <= 100 ) a,
(SELECT /*+ NO_MERGE */ LEVEL ID FROM dual CONNECT BY LEVEL <= 10 ) b
WHERE a.id = b.id;
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 26 | 4 (0)| 00:00:01 |
| 1 | NESTED LOOPS | | 1 | 26 | 4 (0)| 00:00:01 |
| 2 | VIEW | | 1 | 13 | 2 (0)| 00:00:01 |
|* 3 | CONNECT BY WITHOUT FILTERING| | | | | |
| 4 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
|* 5 | VIEW | | 1 | 13 | 2 (0)| 00:00:01 |
|* 6 | CONNECT BY WITHOUT FILTERING| | | | | |
| 7 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
3 - filter(LEVEL<=10)
5 - filter("A"."ID"="B"."ID")
6 - filter(LEVEL<=100)
{code} -
Dear All,
My client wants to do the performance tuning in a query where it has the Global structure of 300 CKF & 300 RKF.
They dont want to touch the MP, all they want to do some performance tuning through the front end without touching the Multiprovider.
The CKF is little bit tricky where in Each CKF has 28 RKF and In each RKF atleast 2 variables are used an with hierarchy restrictions. The query is taking 30 - 40 min to execute. Kindly guide me how to handle this.
Regards,
Suman Thangadurai.HI,
Improving query performance u2013
- Generate index.
- Build query on multiprovider and better use Constant Selection Function to bring infoset functionality to Multiprovider.
- Make your query more dynamic using variables.
- Do partitioning on IC when you have restriction on 0CALMONTH.
- Use more free charecterstics.
- Use include than exclude at Bex level.
- Utilize Cache mode and Read mode functions.
Regards,
rvc
Maybe you are looking for
-
IMovie - import into events by date?
Hi gang, iMovie used to have an option that would automatically create a new event for each new date that clips were filmed. This was helpful when importing video that was filmed over long time periods spanning multiple events. I can't find the opt
-
How and/or where do I write a review on an app?
where are the reviews written?
-
Issues tagging faces in iphoto and Facebook
Hi I have iPhoto 11 (v9.4.3 720.91) and have been using faces on it for the last 4 months or so. I linked my facebook account with my iPhoto and have been sharing albums on facebook happily, assuming the faces I tagged were tagging on facebook too. H
-
Httpd not processing php correctly
I have a weird issue with a Jooma CMS. Mysqld is up, httpd is up, php is installed. I've updated php.ini to include the vhost directories. The sites actually come up but they don't display perfectly. Joomla's header, sidebar menu, and several modul
-
What is the right workflow for Lighting Effect in Premiere and Grain Removal in After Effects?
Hi, I am working with a footage that was recorded in a dark room. In Premiere Pro CC 2014 I have applied a Omni Lighting Effect, which brought some light into the scene. But, as you can imagine, now the picture is very grainy. In Premiere Pro there i