How to improve the performance of the abap program
hi all,
I have created an abap program. And it taking long time since the number of records are more. And can anyone let me know how to improve the performance of my abap program.
Using se30 and st05 transaction.
can anyone help me out step by step
regds
haritha
Hi Haritha,
->Run Any program using SE30 (performance analysis)
Note: Click on the Tips & Tricks button from SE30 to get performance improving tips.
Using this you can improve the performance by analyzing your code part by part.
->To turn runtim analysis on within ABAP code insert the following code
SET RUN TIME ANALYZER ON.
->To turn runtim analysis off within ABAP code insert the following code
SET RUN TIME ANALYZER OFF.
->Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
->Avoid for all entries in JOINS
->Try to avoid joins and use FOR ALL ENTRIES.
->Try to restrict the joins to 1 level only ie only for tables
->Avoid using Select *.
->Avoid having multiple Selects from the same table in the same object.
->Try to minimize the number of variables to save memory.
->The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
->Avoid creation of index as far as possible
->Avoid operators like <>, > , < & like % in where clause conditions
->Avoid select/select single statements in loops.
->Try to use 'binary search' in READ internal table. -->Ensure table is sorted before using BINARY SEARCH.
->Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
->Avoid using ORDER BY in selects
->Avoid Nested Selects
->Avoid Nested Loops of Internal Tables
->Try to use FIELD SYMBOLS.
->Try to avoid into Corresponding Fields of
->Avoid using Select Distinct, Use DELETE ADJACENT
Check the following Links
Re: performance tuning
Re: Performance tuning of program
http://www.sapgenie.com/abap/performance.htm
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
check the below link
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
See the following link if it's any help:
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
Check also http://service.sap.com/performance
and
books like
http://www.sap-press.com/product.cfm?account=&product=H951
http://www.sap-press.com/product.cfm?account=&product=H973
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
Performance tuning for Data Selection Statement
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
Debugger
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
Run Time Analyser
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
SQL trace
http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
CATT - Computer Aided Testing Too
http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
Test Workbench
http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
Coverage Analyser
http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
Runtime Monitor
http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
Memory Inspector
http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
ECATT - Extended Computer Aided testing tool.
http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
Just refer to these links...
performance
Performance
Performance Guide
performance issues...
Performance Tuning
Performance issues
performance tuning
performance tuning
You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
edited by,
Naveenan
Similar Messages
-
How to improve the performance of the query
Hi,
Help me by giving tips how to improve the performance of the query. Can I post the query?
SureshBelow is the formatted query and no wonder it is taking lot of time. Will give you a list of issues soon after analyzing more. Till then understand the pitfalls yourself from this formatted query.
SELECT rt.awb_number,
ar.activity_id as task_id,
t.assignee_org_unit_id,
t.task_type_code,
ar.request_id
FROM activity_task ar,
request_task rt,
task t
WHERE ar.activity_id =t.task_id
AND ar.request_id = rt.request_id
AND ar.complete_status != 'act.stat.closed'
AND t.assignee_org_unit_id in (SELECT org_unit_id
FROM org_unit
WHERE org_unit_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
OR parent_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
AND has_queue=1
AND ar.parent_task_id not in (SELECT tt.task_id
FROM task tt
WHERE tt.assignee_org_unit_id in (SELECT org_unit_id
FROM org_unit
WHERE org_unit_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
OR parent_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
AND has_queue=1
AND rt.awb_number is not null
ORDER BY rt.awb_numberCheers
Sarma. -
Improve the performance of the data activation on DSO.
Hi,
I would like to improve the performance of the data activation on DSO. 1000 records should be uploaded by 10 minutes.
Now it takes 10 minutes to activate data in DSO. And it is strange that it takes long time ( about 9 minutes) before starting activation.
ex :
in the request task log of the activation:
data activation 15:10:00
main process 15:10:01
technical status 15:10:21
But activation is started at 15:01:00 here. (this is started via process chain).
I have no idea why it takes so long time and how I can improve.
Kind regards,
MasaakiHi,
Try this also.
1. Remove Bex Reporting check box in ODS if not required.
2. Goto manage ODS -> activate -> activate in parallel -> increase the number of processes from there.For direct access try TCode RSODSO_SETTINGS. Not sure this is possible in your case.
thanks,
JituK -
Options to improve the performance of the Job
Hi Team,
As part of the CRM Upgrade requirement, we are planning to use Account Life cycle functionality to reflect the status of an account.
As per the SAP recommendations( Note 1113330) we are currently executing the program CRM_BUPA_USERSTATUS_CONV2ROLE to convert user status master data to BP roles. We have noticed that this program is taking more time even when we run this for single business partner. We are trying to explore the options on how to improve the performance of the job. Incase if anyone have done this kind of exercise in any of their previous assignments or have information on this, request to provide your feedback on the below points.
1) Total Volume of Customer Master Data
2) How many records did we consider for one execution of the conversion program
3) How much time did it toke for one execution ?Did we do any performance tuning
4) When we are running the program in back ground mode..we are not getting the spool
showing the log information. Was there any custom report developed to view the log when
we execute the program in background mode..if so can you share us the technical details
6) Any information on how many work processors that were available for executing the jobs
Appreciate your help.
Regards,
VarunHello Udaya ,
Could you please tryy providing a range of BPs as per note 1121015? This can help in improving the performance .
Thanks & regards,
Krishnen -
Gather Schema Statistics improve the performance of the R12 application?
Hi All,
If we run “Gather Schema Statistics” program, it will improve the performance of the R12 application?
Platform Linux and DB version 10.2.0.4.
Thanks & Regards,
TharunHi Tharun,
If we ruer n “Gather Schema Statistics” program, it will improve the performance of the R12 application?
Yes, it will speed up as it ensures to have an up to date statistics.
Please refer notes:
Concurrent Processing - How To Gather Statistics On Oracle Applications Release 11i and/or Release 12 - Concurrent Process,Temp Tables, Manually [ID 419728.1]
How Often Should Gather Schema Statistics Program be Run? [ID 168136.1]
Why Stats Gather?
Stats gathering must be set as a routine job and is recommended to be scheduled. Even though this program is available from the fronted in the form of submitting a concurrent program basically it performs a DB level enhancement and ensures that you have an up to date optimizer statistics.Because the objects in a database can be constantly changing, statistics must be regularly updated so that they accurately describe these database objects.
For indepth understand as to why it should be run, please refer doc:
Managing Optimizer Statistics
Thanks &
Best Regards, -
Need help in improving the performance for the sql query
Thanks in advance for helping me.
I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. The data count which is updated in the target table is 2 million records and the target table has 15 million records.
Any suggestions or solutions for improving performance are appreciated
SQL query:
update targettable tt
set mnop = 'G',
where ( x,y,z ) in
select a.x, a.y,a.z
from table1 a
where (a.x, a.y,a.z) not in (
select b.x,b.y,b.z
from table2 b
where 'O' = b.defg
and mnop = 'P'
and hijkl = 'UVW';987981 wrote:
I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. And that meant what? Surely if you spend all that time and effort to try various approaches, it should mean something? Failures are as important teachers as successes. You need to learn from failures too. :-)
The data count which is updated in the target table is 2 million records and the target table has 15 million records.Tables have rows btw, not records. Database people tend to get upset when rows are called records, as records exist in files and a database is not a mere collection of records and files.
The failure to find a single faster method with the approaches you tried, points to that you do not know what the actual performance problem is. And without knowing the problem, you still went ahead, guns blazing.
The very first step in dealing with any software engineering problem, is to identify the problem. Seeing the symptoms (slow performance) is still a long way from problem identification.
Part of identifying the performance problem, is understanding the workload. Just what does the code task the database to do?
From your comments, it needs to find 2 million rows from 15 million rows. Change these rows. And then write 2 million rows back to disk.
That is not a small workload. Simple example. Let's say that the 2 million row find is 1ms/row and the 2 million row write is also 1ms/row. This means a 66 minute workload. Due to the number of rows, an increase in time/row either way, will potentially have 2 million fold impact.
So where is the performance problem? Time spend finding the 2 million rows (where other tables need to be read, indexes used, etc)? Time spend writing the 2 million rows (where triggers and indexes need to be fired and maintained)? Both? -
How to translate the key words in ABAp program from lower case to upper cas
How to translate the key words in ABAp program from lower case to upper case?
Hi Kittu,
You need to set the Pretty Printer settings to achieve key words in ABAP program from lower case to upper case.
Utilities -> Settings -> Pretty Printer (tab) -> Select third radio button.
Thats all.
<b>Reward points if this helps.
Manish</b> -
How to check the performance of the database instance in oracle apps 11i
hii everybody,
i want to know,how to check the performance of the database instance using oracle applications 11i.your help highly appreciated,thanks.Pl do not post duplicates - how to check the performance of the server in oracle applications 11i
-
Improve the performance of the code
Hi All,
Just check the below report and give some hits to improve the performance of the report.
LOOP AT WBS_TAB.
CLEAR: HOLD_PO_NBR,
HOLD_PO_LINE.
SELECT * FROM EKKN
WHERE PS_PSP_PNR = WBS_TAB-INTNO
AND EBELN IN S_PO
AND KOKRS = P_KOKRS.
CHECK EKKN-LOEKZ <> 'X'.
CLEAR GC_PROFL.
WRITE WBS_TAB-PSPHI TO LC_PSPID.
*select direct projects only if p_direct = 'X'.
IF P_DIRECT = 'X'.
SELECT SINGLE PROFL FROM PROJ INTO GC_PROFL
WHERE PSPID = LC_PSPID.
IF GC_PROFL+4(3) = '002'
OR GC_PROFL+4(3) = '007'.
CONTINUE.
ENDIF.
ENDIF.
select indirect projects and cost centers only when p_indir = 'X'.
IF P_INDIR = 'X'.
SELECT SINGLE PROFL FROM PROJ INTO GC_PROFL
WHERE PSPID = LC_PSPID.
IF GC_PROFL+4(3) NE '002'
AND GC_PROFL+4(3) NE '007'.
CONTINUE.
ENDIF.
ENDIF.
CLEAR: GC_EINDT,
GC_PRCTR.
GC_PRCTR = WBS_TAB-PRCTR.
PERFORM PROCESS_MAIN2.
ENDSELECT.
ENDLOOP.
FORM PROCESS_MAIN2.
SELECT SINGLE * FROM EKKO WHERE EBELN = EKKN-EBELN.
CHECK EKKO-LIFNR IN VEND_NO.
CHECK EKKO-AEDAT IN S_POCDAT.
SELECT SINGLE * FROM EKPO WHERE EBELN = EKKN-EBELN AND
EBELP = EKKN-EBELP.
CHECK EKPO-LOEKZ <> 'L' AND
EKPO-LOEKZ <> 'S'.
SELECT SINGLE EINDT FROM EKET INTO GC_EINDT
WHERE EBELN = EKPO-EBELN
AND EBELP = EKPO-EBELP
AND EINDT IN S_EINDT.
IF NOT S_EINDT IS INITIAL.
CHECK GC_EINDT IN S_EINDT.
ENDIF.
CLEAR ITAB.
ITAB-PO_CREATE = EKKO-AEDAT.
ITAB-DEL_DAT = GC_EINDT.
ITAB-PO_NO = EKKO-EBELN.
ITAB-CURR_PO = EKKO-WAERS.
ITAB-CURR_CO = TKA01-WAERS.
ITAB-LINE = EKPO-EBELP.
ITAB-GR_SW = EKPO-WEPOS.
ITAB-GR_NON_VAL_SW = EKPO-WEUNB.
IF EKPO-WEUNB = 'X'. "Goods Receipt, Non-Value
ITAB-GR_SW = ''. "switch evaluation of commitment to IR
ENDIF.
ITAB-TEXT = EKPO-TXZ01.
ITAB-QTY_ORD = EKPO-MENGE.
ITAB-UOM = EKPO-MEINS.
ITAB-AMOUNT_DOC = EKPO-EFFWR.
ITAB-WBS = EKKN-PS_PSP_PNR.
ITAB-COST_ELEM = EKKN-SAKTO.
ITAB-KOSTL = EKKN-KOSTL.
ITAB-PRCTR = GC_PRCTR.
ITAB-ANLN1 = EKKN-ANLN1.
ITAB-AUFNR = EKKN-AUFNR.
ITAB-ZEKKN = EKKN-ZEKKN.
IF EKKN-VPROZ <> 0.
PERCENT = EKKN-MENGE / EKPO-MENGE.
ITAB-AMOUNT_DOC = ITAB-AMOUNT_DOC * PERCENT .
ITAB-QTY_ORD = ITAB-QTY_ORD * PERCENT .
ENDIF.
IF ITAB-CURR_CO NE ITAB-CURR_PO.
itab-amount_co = itab-amount_doc * ekko-wkurs.
Convert from PO curr to CO currency
GS_CONV_AMT = ITAB-AMOUNT_DOC / GS_CORATE.
PERFORM GET_CURR_RATE USING ITAB-CURR_PO EKKO-AEDAT
CHANGING GS_RATE.
ITAB-AMOUNT_CO = GS_CONV_AMT * GS_RATE.
ELSE.
ITAB-AMOUNT_CO = ITAB-AMOUNT_DOC.
ENDIF.
Convert from PO curr to CO Code currency
CLEAR: ITAB-CURR_LOC, GS_RATE.
PERFORM GET_COCD_RATE USING EKKO-BUKRS
CHANGING ITAB-CURR_LOC GS_RATE.
IF ITAB-CURR_LOC NE ITAB-CURR_PO.
Get company code/local currency and rate.
GS_CONV_AMT = ITAB-AMOUNT_DOC / GS_RATE.
PERFORM GET_CURR_RATE USING ITAB-CURR_PO ITAB-PO_CREATE
CHANGING GS_RATE.
ITAB-AMOUNT_LOC = GS_CONV_AMT * GS_RATE.
ELSE.
ITAB-AMOUNT_LOC = ITAB-AMOUNT_DOC.
ENDIF.
ITAB-VEND_NO = EKKO-LIFNR.
APPEND ITAB.
CLEAR ITAB.
ENDFORM.
Thanks,
Subbu.Hi,
In your code instead of using
SELECT * FROM EKKN
WHERE PS_PSP_PNR = WBS_TAB-INTNO
AND EBELN IN S_PO
AND KOKRS = P_KOKRS.
ENSELECT
USe
DATA:
TYPES: BEGIN OF t_ekkn.
INCLUDE STRUCTURE ekkn.
TYPES: END OF t_ekkn.
DATA: t_ekkn TYPE TABLE OF t_ekkn,
t_ekkn_wa TYPE t_ekkn.
FIELD-SYMBOLS: <t_ekkn> TYPE t_ekkn.
SELECT * FROM EKKN
INTO TABLE t_ekkn
WHERE PS_PSP_PNR = WBS_TAB-INTNO
AND EBELN IN S_PO
AND KOKRS = P_KOKRS.
Loop at t_ekkn assigning <t_ekkn>.
Copy your existing logic between SELECT & ENDSELECT of EKKN
Endloop.
I hope this helps,
Regards
Raju Chitale -
How to check the performance of the server in oracle applications 11i
hii everybody,
i want to know,how to check the performance of the system(test server) using oracle applications 11i.your help highly appreciated,thanks.938946 wrote:
hii everybody,
i want to know,how to check the performance of the system(test server) using oracle applications 11i.your help highly appreciated,thanks.Please see old threads for the same topic/discussion -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Performance+AND+Tuning&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
What are the performance tools in ABAP ?
What are the performance tools in ABAP ?
some thing like SQL Trace, Runtime Analysis ......what else ?hi,
Runtime Monitor
http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
Memory Inspector
http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
Run Time Analyser
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
SQL trace
http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm -
How to improve query performance using infoset
I create one infoset that including 4 char.and 3 DSO which all are time-dependent.When query run, system show very poor perfomance, sometimes no data show in BEX anayzer. In this case I have to close BEX analyzer at first and then open it again, after that it show real results. It seems very strange. Does anybody has experience on infoset performance improvement. pls info, thanks!
Hi
As info set itself doesn't have any data so it improves Performance
also go through the below tips.
Find the query Run-time
where to find the query Run-time ?
557870 'FAQ BW Query Performance'
130696 - Performance trace in BW
This info may be helpful.
General tips
Using aggregates and compression.
Using less and complex cell definitions if possible.
1. Avoid using too many nav. attr
2. Avoid RKF and CKF
3. Many chars in row.
By using T-codes ST03 or ST03N
Go to transaction ST03 > switch to expert mode > from left side menu > and there in system load history and distribution for a particular day > check query execution time.
Statistical Records Part 4: How to read ST03N datasets from DB in NW2004
How to read ST03N datasets from DB
Try table rsddstats to get the statistics
Using cache memory will decrease the loading time of the report.
Run reporting agent at night and sending results to email. This will ensure use of OLAP cache. So later report execution will retrieve the result faster from the OLAP cache.
Also try
1. Use different parameters in ST03 to see the two important parameters aggregation ratio and records transferred to F/E to DB selected.
2. Use the program SAP_INFOCUBE_DESIGNS (Performance of BW infocubes) to see the aggregation ratio for the cube. If the cube does not appear in the list of this report, try to run RSRV checks on the cube and aggregates.
Go to SE38 > Run the program SAP_INFOCUBE_DESIGNS
It will shown dimension Vs Fact tables Size in percent.If you mean speed of queries on a cube as performance metric of cube,measure query runtime.
3. To check the performance of the aggregates,see the columns valuation and usage in aggregates.
Open the Aggregates...and observe VALUATION and USAGE columns.
"---" sign is the valuation of the aggregate. You can say -3 is the valuation of the aggregate design and usage. ++ means that its compression is good and access is also more (in effect, performance is good). If you check its compression ratio, it must be good. -- means the compression ratio is not so good and access is also not so good (performance is not so good).The more is the positives...more is useful the aggregate and more it satisfies the number of queries. The greater the number of minus signs, the worse the evaluation of the aggregate. The larger the number of plus signs, the better the evaluation of the aggregate.
if "-----" then it means it just an overhead. Aggregate can potentially be deleted and "+++++" means Aggregate is potentially very useful.
In valuation column,if there are more positive sign it means that the aggregate performance is good and it is useful to have this aggregate.But if it has more negative sign it means we need not better use that aggregate.
In usage column,we will come to know how far the aggregate has been used in query.
Thus we can check the performance of the aggregate.
Refer.
http://help.sap.com/saphelp_nw70/helpdata/en/b8/23813b310c4a0ee10000000a114084/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/60/f0fb411e255f24e10000000a1550b0/frameset.htm
performance ISSUE related to AGGREGATE
Note 356732 - Performance Tuning for Queries with Aggregates
Note 166433 - Options for finding aggregates (find optimal aggregates for an InfoCube)
4. Run your query in RSRT and run the query in the debug mode. Select "Display Aggregates Found" and "Do not use cache" in the debug mode. This will tell you if it hit any aggregates while running. If it does not show any aggregates, you might want to redesign your aggregates for the query.
Also your query performance can depend upon criteria and since you have given selection only on one infoprovider...just check if you are selecting huge amount of data in the report
Check for the query read mode in RSRT.(whether its A,X or H)..advisable read mode is X.
5. In BI 7 statistics need to be activated for ST03 and BI admin cockpit to work.
By implementing BW Statistics Business Content - you need to install, feed data and through ready made reports which for analysis.
http://help.sap.com/saphelp_nw70/helpdata/en/26/4bc0417951d117e10000000a155106/frameset.htm
/people/vikash.agrawal/blog/2006/04/17/query-performance-150-is-aggregates-the-way-out-for-me
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
http://help.sap.com/saphelp_nw04/helpdata/en/c1/0dbf65e04311d286d6006008b32e84/frameset.htm
You can go to T-Code DB20 which gives you all the performance related information like
Partitions
Databases
Schemas
Buffer Pools
Tablespaces etc
use tool RSDDK_CHECK_AGGREGATE in se38 to check for the corrupt aggregates
If aggregates contain incorrect data, you must regenerate them.
202469 - Using aggregate check tool
Note 646402 - Programs for checking aggregates (as of BW 3.0B SP15)
You can find out whether an aggregate is usefull or useless you can find out through a proccess of checking the tables RSDDSTATAGGRDEF*
Run the query in RSRT with statistics execute and come back you will get STATUID... copy this and check in the table...
This gives you exactly which infoobjects it's hitting, if any one of the object is missing it's useless aggregate.
6
Check SE11 > table RSDDAGGRDIR . You can find the last callup in the table.
Generate Report in RSRT
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c0ab590-0201-0010-bd9a-8332d8b4f09c
Business Intelligence Journal Improving Query Performance in Data Warehouses
http://www.tdwi.org/Publications/BIJournal/display.aspx?ID=7891
Achieving BI Query Performance Building Business Intelligence
http://www.dmreview.com/issues/20051001/1038109-1.html
Assign points if useful
Cheers
SM -
Please help me to increase the performance of the query
Hello
I am not an oracle expert or developer and i have a problem to resolve.
Below is the query and explaiation plan and seeking the help to improve the performance of the query.
Our Analysis,
The query runs good,takes less one minute and fetches the results but during peak time it takes 8 minutes
Require anyone suggestion's to improve the query.
The query is generated from the Microsft dll so we dont have SQL code and require some help on tuning the tables.
If tuning the query improves then also fine please suggest for that also.
Enviroment: Solaris 8
DB : oracle 9i
(SELECT vw.dispapptobjid, vw.custsiteobjid, vw.emplastname, vw.empfirstname,
vw.scheduledonsite AS starttime, vw.appttype, vw.latestart,
vw.endtime, vw.typetitle, vw.empobjid, vw.latitude, vw.longitude,
vw.workduration AS DURATION, vw.dispatchtype, vw.availability
FROM ora_appt_disp_view vw
WHERE ( ( vw.starttime >=
TO_DATE ('2/12/2007 4:59 PM', 'MM/DD/YYYY HH12:MI AM')
AND vw.starttime <
TO_DATE ('2/21/2007 3:59 PM', 'MM/DD/YYYY HH12:MI AM')
OR vw.endtime >
TO_DATE ('2/12/2007 4:59 PM', 'MM/DD/YYYY HH12:MI AM')
AND vw.endtime <=
TO_DATE ('2/21/2007 3:59 PM', 'MM/DD/YYYY HH12:MI AM')
OR ( vw.starttime <=
TO_DATE ('2/12/2007 4:59 PM', 'MM/DD/YYYY HH12:MI AM')
AND vw.endtime >=
TO_DATE ('2/21/2007 3:59 PM', 'MM/DD/YYYY HH12:MI AM')
UNION
(SELECT 0 AS dispapptobjid, emp.emp_physical_site2site AS custsiteobjid,
emp.last_name AS emplastname, emp.first_name AS empfirstname,
TO_DATE ('1/1/3000', 'MM/DD/YYYY') AS starttime, 'E' AS appttype,
NULL AS latestart, NULL AS endtime, '' AS typetitle,
emp.objid AS empobjid, 0 AS latitude, 0 AS longitude, 0 AS DURATION,
'' AS dispatchtype, 0 AS availability
FROM table_employee emp, table_user usr
WHERE emp.employee2user = usr.objid AND emp.field_eng = 1 AND usr.status = 1)
ORDER BY empobjid, starttime, endtime DESC
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=HINT: ALL_ROWS 23 K 11312
SORT UNIQUE 23 K 3 M 11140
UNION-ALL
VIEW ORA_APPT_DISP_VIEW 17 K 3 M 10485
UNION-ALL
CONCATENATION
NESTED LOOPS OUTER 68 24 K 437
NESTED LOOPS 68 23 K 369
NESTED LOOPS OUTER 68 25 K 505
NESTED LOOPS OUTER 68 24 K 505
NESTED LOOPS 68 23 K 369
NESTED LOOPS 68 22 K 369
NESTED LOOPS OUTER 68 22 K 369
NESTED LOOPS 19 6 K 312
NESTED LOOPS 19 5 K 312
HASH JOIN 19 5 K 293
NESTED LOOPS 19 5 K 274
NESTED LOOPS 19 4 K 236
NESTED LOOPS 19 4 K 198
NESTED LOOPS OUTER 19 3 K 160
NESTED LOOPS OUTER 19 3 K 160
NESTED LOOPS OUTER 19 4 K 160
NESTED LOOPS OUTER 19 1 K 103
NESTED LOOPS OUTER 19 2 K 103
NESTED LOOPS OUTER 19 2 K 103
TABLE ACCESS BY INDEX ROWID TABLE_DISPTCHFE 19 1 K 46
INDEX RANGE SCAN GSA_SCHED_REPAIR 44 3
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22 3
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28 3
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_CASE 1 30 2
INDEX UNIQUE SCAN CASE_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_SITE 1 12 2
INDEX UNIQUE SCAN SITE_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_ADDRESS 1 12 2
INDEX UNIQUE SCAN ADDRESS_OBJINDEX 1 1
TABLE ACCESS FULL TABLE_EMPLOYEE 1 34 1
INDEX UNIQUE SCAN SITE_OBJINDEX 1 6 1
INDEX UNIQUE SCAN USER_OBJINDEX 1 6
TABLE ACCESS BY INDEX ROWID TABLE_X_GSA_TIME_STAMPS 4 48 3
INDEX RANGE SCAN GSAIDX_TS2DISP 1 2
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
TABLE ACCESS BY INDEX ROWID TABLE_MOD_LEVEL 1 12 1
INDEX UNIQUE SCAN MOD_LEVEL_OBJINDEX 1
INDEX UNIQUE SCAN PART_NUM_OBJINDEX 1 6
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN SUBCASE_OBJINDX 1 6 1
NESTED LOOPS OUTER 68 25 K 505
NESTED LOOPS OUTER 68 24 K 505
NESTED LOOPS OUTER 68 24 K 437
NESTED LOOPS 68 23 K 369
NESTED LOOPS 68 23 K 369
NESTED LOOPS 68 22 K 369
NESTED LOOPS OUTER 68 22 K 369
NESTED LOOPS 19 6 K 312
NESTED LOOPS 19 5 K 312
NESTED LOOPS 19 5 K 293
NESTED LOOPS 19 5 K 274
NESTED LOOPS 19 4 K 236
NESTED LOOPS 19 4 K 198
NESTED LOOPS OUTER 19 4 K 160
NESTED LOOPS OUTER 19 3 K 160
NESTED LOOPS OUTER 19 3 K 160
NESTED LOOPS OUTER 19 2 K 103
NESTED LOOPS OUTER 19 2 K 103
NESTED LOOPS OUTER 19 1 K 103
TABLE ACCESS BY INDEX ROWID TABLE_DISPTCHFE 19 1 K 46
INDEX RANGE SCAN GSA_SCHED_REPAIR 44 3
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22 3
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28 3
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_CASE 1 30 2
INDEX UNIQUE SCAN CASE_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_SITE 1 12 2
INDEX UNIQUE SCAN SITE_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_ADDRESS 1 12 2
INDEX UNIQUE SCAN ADDRESS_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_EMPLOYEE 1 34 1
INDEX UNIQUE SCAN EMPLOYEE_OBJINDEX 1
INDEX UNIQUE SCAN SITE_OBJINDEX 1 6 1
INDEX UNIQUE SCAN USER_OBJINDEX 1 6
TABLE ACCESS BY INDEX ROWID TABLE_X_GSA_TIME_STAMPS 4 48 3
INDEX RANGE SCAN GSAIDX_TS2DISP 1 2
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN SUBCASE_OBJINDX 1 6 1
TABLE ACCESS BY INDEX ROWID TABLE_MOD_LEVEL 1 12 1
INDEX UNIQUE SCAN MOD_LEVEL_OBJINDEX 1
INDEX UNIQUE SCAN PART_NUM_OBJINDEX 1 6
NESTED LOOPS OUTER 68 25 K 505
NESTED LOOPS OUTER 68 24 K 505
NESTED LOOPS OUTER 68 24 K 437
NESTED LOOPS 68 23 K 369
NESTED LOOPS 68 23 K 369
NESTED LOOPS 68 22 K 369
NESTED LOOPS OUTER 68 22 K 369
NESTED LOOPS 19 6 K 312
NESTED LOOPS 19 5 K 312
NESTED LOOPS 19 5 K 293
NESTED LOOPS 19 5 K 274
NESTED LOOPS 19 4 K 236
NESTED LOOPS 19 4 K 198
NESTED LOOPS OUTER 19 4 K 160
NESTED LOOPS OUTER 19 3 K 160
NESTED LOOPS OUTER 19 3 K 160
NESTED LOOPS OUTER 19 2 K 103
NESTED LOOPS OUTER 19 2 K 103
NESTED LOOPS OUTER 19 1 K 103
TABLE ACCESS BY INDEX ROWID TABLE_DISPTCHFE 19 1 K 46
INDEX RANGE SCAN GSA_REQ_ETA 44 3
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22 3
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 22
INDEX RANGE SCAN GSA_COMDFE 1 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28 3
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_COMMIT_LOG 1 28
INDEX RANGE SCAN IND_CASE_COMMIT2CASE 2 2
TABLE ACCESS BY INDEX ROWID TABLE_CASE 1 30 2
INDEX UNIQUE SCAN CASE_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_SITE 1 12 2
INDEX UNIQUE SCAN SITE_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_ADDRESS 1 12 2
INDEX UNIQUE SCAN ADDRESS_OBJINDEX 1 1
TABLE ACCESS BY INDEX ROWID TABLE_EMPLOYEE 1 34 1
INDEX UNIQUE SCAN EMPLOYEE_OBJINDEX 1
INDEX UNIQUE SCAN SITE_OBJINDEX 1 6 1
INDEX UNIQUE SCAN USER_OBJINDEX 1 6
TABLE ACCESS BY INDEX ROWID TABLE_X_GSA_TIME_STAMPS 4 48 3
INDEX RANGE SCAN GSAIDX_TS2DISP 1 2
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN GBST_ELM_OBJINDEX 1 6
INDEX UNIQUE SCAN SUBCASE_OBJINDX 1 6 1
TABLE ACCESS BY INDEX ROWID TABLE_MOD_LEVEL 1 12 1
INDEX UNIQUE SCAN MOD_LEVEL_OBJINDEX 1
INDEX UNIQUE SCAN PART_NUM_OBJINDEX 1 6
NESTED LOOPS 16 K 2 M 5812
HASH JOIN 16 K 2 M 5812
HASH JOIN 16 K 2 M 5286
TABLE ACCESS FULL TABLE_EMPLOYEE 13 K 441 K 28
HASH JOIN 16 K 1 M 5243
TABLE ACCESS FULL TABLE_SCHEDULE 991 11 K 2
HASH JOIN OUTER 16 K 1 M 5240
HASH JOIN OUTER 16 K 1 M 3866
HASH JOIN OUTER 16 K 1 M 450
HASH JOIN 16 K 1 M 44
TABLE ACCESS FULL TABLE_GBST_ELM 781 14 K 2
TABLE ACCESS FULL TABLE_APPOINTMENT 16 K 822 K 41
INDEX FAST FULL SCAN CASE_OBJINDEX 1 M 6 M 201
TABLE ACCESS FULL TABLE_SITE 967 K 11 M 3157
TABLE ACCESS FULL TABLE_ADDRESS 961 K 11 M 1081
INDEX FAST FULL SCAN SITE_OBJINDEX 967 K 5 M 221
INDEX UNIQUE SCAN USER_OBJINDEX 1 6
HASH JOIN 6 K 272 K 51
TABLE ACCESS FULL TABLE_USER 6 K 51 K 21
TABLE ACCESS FULL TABLE_EMPLOYEE 6 K 220 K 28Hi,
First-off, it appear that you are querying a view. I would redo the auery against the base table.
Next, look at a function-based index for the DATE column. Here are my notes:
http://www.dba-oracle.com/t_function_based_indexes.htm
http://www.dba-oracle.com/oracle_tips_index_scan_fbi_sql.htm
Also, make sure you are analyzed properly with dbms_stats:
http://www.dba-oracle.com/art_builder_dbms_stats.htm
And histograms, if appropriate:
http://www.dba-oracle.com/art_builder_histo.htm
Lasty, look at increasing hash_area_size or pga_aggregate_tagtet, depending on your table sizes:
http://www.dba-oracle.com/art_so_undocumented_pga_parameters.htm
Hope this helps. . . .
Donald K. Burleson
Oracle Press Author -
What are the major situations to go to the short dump in abap programming?
What are the major situations to go to the short dump in abap programming?
Hi,
The major situations that an ABAP Program can result a dumb are as follows...
1) Poor coding i.e., if the data in the data base is less, then even a poor code can give you the result. But when you transport the program into Production, then there the same program will give you a dump, resulting 'TIMED OUT' error. So performance tunning is required for each and every program.
2) while calling a function module.
3) extracting of data into fields which are not type casted.
4) in case of x/y value, one should check the value of 'y' should not be zero, else a dump will result.
these are few which i can give for time being........ -
Tweaking the performance of the PC
Hello i am a school student (in my final year) and i have some knowledge on tweaking the performance of the PC so i hope my way helps
Solution to Blue screen with error:
Hi that error is quite a rare error for windows 8.1 users who have their drivers up to date the most common cause is corrupted files in your hdd
if you have a backup of all your files and folders then it is recommended to do a full reinstallation of windows 8.1 and make sure u delete all your partitions including the system and recovery partition when you reinstall
once you have reinstalled download the latest drivers using Toshiba support page and also install latest windows updates as soon as possible once you have completely recovered your pc make sure to create a recovery media using the win 8.1 installation disk
and save that media then create a system image backup for the future
How to create system image backup: please follow this guide for images and videos
http://www.avoiderrors.net/create-system-image-backups-of-windows-8-1-and-restore-from-it/
and then once you have done that you should have a installation media and a system image backup then you can move to increasing the PC performance
PC performance boost tips:
Ok step one: creating a system restore point
(i): open your search tab in windows 8.1 desktop and type "create system restore point"(no quote marks) and select the system restore point option.
(ii): when the system properties tab open click on the button called create on the bottom on the tab
(iii): another tab will ask you to name the system restore point so you can identify it so type a name of your choice and click create
an thats all
Ok step two : remove unnecessary antivirus software (if you have any)
normally on a new PC you get a bunch of junk software along with a trail pack of an antivirus software usually it's McAfee so uninstall that and uninstall the other useless junk software if you have any problems with uninstallating then use Revo uninstaller
app to uninstall
since you did a reinstall of windows you will not have any of those so skip step two
Step three: Installing a good antivirus software
now the most recommended would be either Norton or Kaspersky but if you feel like going for free ones then i suggest
Avira or Avast as a good antivirus software also the renowned Malawarebytes is also quite good
i personally use malwarebytes free version since i can run it along side my main antivirus software without it conflicting with each other
once you have installed the software on your pc make sure you run a full scan for your first time
and move to step four.
Step four: System registry errors
to fix registry error you will need a third party software my personal recommendation is ccleaner and glary utilities
http://www.glarysoft.com/
http://www.piriform.com/
install either one and then run a maintenance on your PC the UI for both is quite user friendly so you won't have any problems
for glary utilities do the 1 click maintenance and for ccleaner do the cleaner option and then do the registry option
just analyze and click repair or fix error thats all once it does a repair do another analysis and if it shows 0 errors then your PC is clean if it shows errors then click repair again and repeat the process till you get 0 errors
then move to step five.
Step five: Startup speed
to speed up your start up just open glary utilities or ccleaner
for ccleaner click tools box and click on the "Startup" option then click on the programs that you feel are not needed on startup and click disable this option will not allow the programs to startup along with windows they will instead will
start up when you start them up
for glary click on the advanced tab and under the system control menu you will find the "Startup items" option disable the programs you feel are not needed during startup the bonus of glary is that it shows whether the program holds any relevance
to your PC if it is on startup or not so you will know whether it is needed or not once you disable your unwanted startup programs move to step six.
Step six: How to optimize your windows 8.1 paging file
watch this video and follow it's steps
https://www.youtube.com/watch?v=rQ98T4Qt42M
once you have finished step six then move to step seven
Step seven: How to enable windows 8.1 Hard Drive Write Caching
watch this video and follow it's steps carefully
https://www.youtube.com/watch?v=4gye7Odj-Io
once you have finished this then time to tweak your visual effects which is the last step
Step eight: Adjust visual effects
ok this is the last step
(i): open search bar and type
"Adjust the appearance and performance of Windows" (copy paste without quotes if you like)
and the performance tab will open
(ii): now click on the option "Adjust for best performance" and this will remove all your visual effects now i know it can look a little bad but the more options you have the more resource your PC is going to use but since the fonts look bad click
on the checkbox in the custom tab that says "smooth edges of screen fonts" this should give your pc a good look while using the least amount of resource and that is all.
Ok that all for performance tweak i hope your PC speeds up a bit please tell me if you have any problems
PS:
i do not own the videos in the video links i merely recommended them since the steps in the video are quite easy to follow even for a complete amateur.Hi,
Thank you for sharing the solutions here. It will be very beneficial for other community members who have similar questions.
Regards.
Yolanda Zhu
TechNet Community Support
Maybe you are looking for
-
Column in Dreamweaver layout not aligned
I am having problems getting my wesbite columns to align, I came here to ask if anyone can help me align that column, this is my first website. below is how I am seeing things: The first image shows how I want the homepage to look like ||||| The
-
Has anyone seen this issue ??? I am so mad with my 1 day-old MacbookPro 17
I just got my MBP 17 this morning. I have been using it for 5 hours with better battery life, but terrible thing happened. I have found hard drive was clicking 10 seconds per time, and computer freezing for many times and even tonight(just now). I wa
-
Patch Tool Missing Mouse Pointer...
WIERD While using the patch tool, it's patching about 2-3 inches to the left of my mouse pointer, ONLY on one image that I'd adjust the Exposure and Sharpening of. Others are patching normally.
-
IBook doesnt start anymore (red, green & blue screens)
Today at college, i just wanted to get my iBook out of the standby and nothing happened. Black screen, just the DVD inside it ran and even the restart buttons didnt work, only taking out the battery brought it down. Then i restarted it and some grey
-
Can't delete a song on my song list
I was sent a song through bbm, and then deleted it right after listening to it Suddenly, the song title reappears on my song list.. AND when i try to listen/click on it, the next song plays (next song on the list) ive checked the miniSD card. the tra