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
Similar Messages
-
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. -
What are the steps doing a performance tuning for pertcular program
What are the steps doing a performance tuning for pertcular program
chk this link
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
checkout these links:
www.sapgenie.com/abap/performance.htm
www.sap-img.com/abap/ performance-tuning-for-data-selection-statement.htm
www.thespot4sap.com/Articles/ SAPABAPPerformanceTuning_Introduction.asp
Message was edited by: Chandrasekhar Jagarlamudi -
Performance Tuning for BAM 11G
Hi All
Can anyone guide me for any documents or any tips realted to performance tuning for BAM 11G on on LinuxIt would help to know if you have any specific issue. There are number of tweaks all they way from DB to Browser.
Few key things to follow:
1. Make sure you create index on DO. If there are too much old data in the DO and not useful then periodically delete it. Similar to relational database indexes, defining indexes in Oracle BAM creates and maintains an ordered list of data object elements for fast retrieval.
2. Ensure that IE setup to do automatic caching. This will help with reducing server round trips.
3. Tune DB performance. This would typically require DBA. Identify the SQL statements most likely to be causing the waits by looking at
the drilldown Top SQL Statements Ordered by Wait Time. Use SQL Analyze, EXPLAIN PLAN, or the tkprof utility to tune the queries that were identified.
Check the Dataobject tables involved in the query for missing indexes.
4. Use batching (this is on by default for most cases)
5. Fast network
6. Use profilers to look at machine load/cpu usage and distribute components on different boxes if needed.
7. Use better server AND client hardware. BAM dashboard are heavy users of ajax/javascript logic on the client -
Performance Tuning for Concurrent Reports
Hi,
Can you help me with Performance Tuning for Concurrent Reports/Requests ?
It was running fine but suddenly running slow.
Request Name : Participation Process: Compensation programWhat is your application release?
Please see if (Performance Issues With Participation Process: Compensation Workbench [ID 389979.1]) is applicable.
To enable trace/debug, please see (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1] -- 5. How does one enable trace for a concurrent program INCLUDING bind variables and waits?).
Thanks,
Hussein -
Performance tuning for siebel CRM application on oracle database
Hi,
Please send me the link for Performance tuning for siebel CRM application on oracle database. If there are any white papers please send me the link.
Thanks,
RajeshHi,
This metalink document is very useful, if you have any other documents or links please inform me.
Thanks once again
Rajesh -
hi Experts,
while running SQL Query i am getting an error as
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
select T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
T2.LineText
from OQUT T0 INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
group by T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,T2.LineText
how to resolve the issueDear Meghanath,
Please use the following query, Hope your purpose will serve.
select T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
CAST(T2.LineText as nvarchar (MAX))[LineText]
from OQUT T0 INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
group by T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,CAST(T2.LineText as nvarchar (MAX))
Regards,
Amit -
Save Query - An error occurred while creating connection strings for the query
A workbook trying to edit and reload I get the following error "Save Query - An error occurred while creating connection strings for the query" No Power Pivot data model or anything.
I am getting the same error when editing a Power Query in an Excel spreadsheet. It happens when I change a Group By step to do a Sum instead of Count Rows.
-
RPD - Cannot obtain number of columns for the query result :Working with MS SQL 2012 schema
Hi All,
I have created my warehouse in MS SQL 2012.
For management purpose, I have created different schemas in SQL database
In RPD, Physical layer, when i view data > I get error as
[nQSError:16002] Cannot obtain number of columns for the query result.
[nQSError:16001] ODBC error state : S0002 code : 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name 'tbl'..
[nQSError:16001] ODBC error state : S0002 code : 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server] Statements could not be prepared..
I have already browsed : OBIEE 11g Strange ODBC Driver Error with SQL Server : Total Business Intelligence ... did not help me
please help!!!Hi All,
After all R&D it is been found that Oracle business administrator( RPD) needs default dbo schema. It doesn't accept custom schema for pulling data.
If anybody have other views please share.!!
Thank you -
To know the users and the variables for the query
Hi,
Say I have one query and which is executed 5 times in the day n i can see this in ST03N Expert mode. Now, suppose i want to see the users who executed the query and what are the selections they gave for the query to run, is there a place to see this?
Appreciate your time
SriramSriram,
You can use BW Statistics to view technical information regarding users. SAP also delivers queries that give you usage by users, just install from business content. The statistics cubes extract data from various tables including:
RSDDSTAT
RSDDSTATAGGR
etc..
You can search more, names will start with "RSDDSTAT*"
Hope it helps,
Farhan -
Program name for the query generated using sq0102-03
Hi Folks,
How can we know the proggram name for the query generated using sq01 and all?
K.Kiran.Hi Kiran,
U can get program name of nay transaction code by following this procedure
after entering tcode it will direct u to the related screen then on the tool bar select system then go for status there u can find program name
Rewards if helpfull
Regards,
Pavan -
Please Help for the Query
Hi frds please help me for the below query.What I want to do is to pull out the data from below table :-
date ticker indicator
03/13/2008 3IINFOTECH -8
03/18/2008 3IINFOTECH -4
03/25/2008 3IINFOTECH -5
03/27/2008 3IINFOTECH -3
as such :-
date ticker indicator
03/13/2008 3IINFOTECH -8
03/25/2008 3IINFOTECH -5
03/27/2008 3IINFOTECH -3
Here I want to find the Trend i.e either asc or desc order from the lowest indicator.
In the above sample data -8, -4, -5, -3 out of which I want the asc order data -8, -5, -3 and exclude -4 data.Because the asc order -8, -5, -3 will not follow.
So I want the data
date ticker indicator
03/13/2008 3IINFOTECH -8
03/25/2008 3IINFOTECH -5
03/27/2008 3IINFOTECH -3SQL> CREATE TABLE BORRAME(FECHA DATE, INDICA VARCHAR2(100));
Tabla creada.
SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/13/2008','MM/DD/YYYY'), '3IINFOTECH -8');
1 fila creada.
SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/18/2008','MM/DD/YYYY'), '3IINFOTECH -4');
1 fila creada.
SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/25/2008','MM/DD/YYYY'), '3IINFOTECH -5');
1 fila creada.
SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/27/2008','MM/DD/YYYY'), '3IINFOTECH -3');
1 fila creada.
SQL> COMMIT;
Validación terminada.
SQL>
SQL> SELECT FECHA, INDICA
2 FROM BORRAME
3 WHERE SUBSTR(INDICA,INSTR(INDICA,'-',1)+1,LENGTH(INDICA)) <> '4'
4 ORDER BY SUBSTR(INDICA,INSTR(INDICA,'-',1)+1,LENGTH(INDICA)) DESC;
FECHA
INDICA
13/03/08
3IINFOTECH -8
25/03/08
3IINFOTECH -5
27/03/08
3IINFOTECH -3
-
hello,
I have a question again. The tables for the query are "Patient" and "Station".
Station-Table:
s_id, station
Patient-Table:
p_id, name, s_id, gender
I want to know how many Patient are Male and Female for each Station. That means that the output should be:
Station Male Female
S1 12 10
S2 6 4I supposed the values in gender are 'M' for Male and 'F' for Female
select s.station, sum(decode(p.gender, 'M', 1, 0)) Male , sum(decode(p.gender, 'F', 1, 0)) Female
from station s, patient p
where s.s_id=p.s_id
group by s.station; -
How to Export/Import "report for the query" to another company
Hello,
I do this:
1.create query in SQL analizer
2.copy paste into SBO query generator and save
3.create report for the query
Then, How to Export/Import "report for the query" to another company ?
Thanks for your HELP.Look for SAP Note number 600813
That's the note Adele means, I guess.
<b>Edit (@13:18)</b>
The direct link:
https://websmp101.sap-ag.de/~sapidb/012006153200000183292003E.ITF
---- Replace *SOURCE* with the source database name.
---- Replace *DEST* with the destination database name.
insert into [*DEST*].[dbo].[RDOC]
select [*SOURCE*].[dbo].[RDOC].*
from
[*SOURCE*].[dbo].[RDOC],[*DEST*].[dbo].[cinf],[*SOURCE*].[dbo].[cinf]
where [*DEST*].[dbo].[cinf].[lawsset]=[*SOURCE*].[dbo].[cinf].[lawsset]and [*DEST*].[dbo].[cinf].[version]=[*SOURCE*].[dbo].[cinf].[version] and [*SOURCE*].[dbo].[RDOC].[Doccode]NOT IN (SELECT Doccode from [*DEST*].[dbo].[RDOC])
insert into [*DEST*].[dbo].[RITM]
select [*SOURCE*].[dbo].[RITM].*
from [*SOURCE*].[dbo].[RITM],[*DEST*].[dbo].[cinf],[*SOURCE*].[dbo].[cinf] where [*SOURCE*].[dbo].[RITM].[Doccode] NOT IN (select Doccode from [*DEST*].[dbo].[RITM])AND [*SOURCE*].[dbo].[RITM].[Doccode]IN (SELECT Doccode from [*DEST*].[dbo].[RDOC])
Hope it helps...
Grtz, Rowdy
Maybe you are looking for
-
Getting Ripped DVD Video and Audio Into Encore
Do you have previously authored DVDs that need rework? Do you want to add menus with greater impact and functionality? Do you want to add some additional program or supplemental material? Does a client want their product demo DVD to be updated to
-
Condition type in Billing not in Sales Order
Dear Friends, I have the following scenario in our project. Please clarify. We have a condition type. That should be appeared only in Billing, it should not appear in Sales Order. Please answer ASAP. Regards, Rajesh L
-
I want to hide certain pictures in the "Gallery"so only I can see when I want. How can I do this?
-
HT201250 Is there a size limit for an external drive to be used with time machine?
I have an iMac with a 2TB drive. I have a 2TB WD drive used for Time Machine that is full. I would like to go to the bigest WD (type) external drive that will work with Time Machine. Is there a TB limit for TM in OS X Lion?
-
Integration with CM Systems ...
Can anyone explain to me clearly what does Weblogic mean when it says it integrated with Interwoven and Documentum. Is there any difference in the way it interacts with Interwoven as compared to Documentum. As in a run-time interaction with Documentu