Pls help in performance tuning SQL
Hi All,
Can someone please help me to tune this quesry. Rt now it is takin 20 mins tro retuns 80,000 rows and its using dblink
SELECT COUNT(*) FROM
(SELECT /*+driving_site(main)*/CORP_ACTG_PRD_YEAR,
CORP_ACTG_PRD_NBR,
FCN_CODE,
LOCAL_CRNC_CODE,
GL_LOCAL_AMT,
CORP_ID,
PGRD_COST_CTR_ID,
MAJOR_CODE,
EXP_MINOR_CODE,
PGRD_EXP_CODE,
PGRD_EXP_DESC,
DIV_CODE,
MKT_CODE,
PROD_CODE,
PGRD_PROJECT_CODE,
PGRD_PROJ_SHORT_DESC
FROM --#GifDBLink# main,
[email protected] main,
select actg_prd_year, actg_prd_nbr from DM_GIF_ESSBASE_CTRL
where cur_prd_ind='Y' and src_id=84
union
select decode(actg_prd_nbr,1,actg_prd_year-1,actg_prd_year) actg_prd_year,
decode(actg_prd_nbr,1,12,actg_prd_nbr-1) actg_prd_nbr
from DM_GIF_ESSBASE_CTRL
where cur_prd_ind='Y' and src_id=84
union
select decode(actg_prd_nbr,12,actg_prd_year+1,actg_prd_year) actg_prd_year,
decode(actg_prd_nbr,12,1,actg_prd_nbr+1) actg_prd_nbr
from DM_GIF_ESSBASE_CTRL
where cur_prd_ind='Y' and src_id=84 ) minor
where main.CORP_ACTG_PRD_YEAR = minor.actg_prd_year
and main.CORP_ACTG_PRD_NBR = minor.actg_prd_nbr) T;
user13365939 wrote:
anyone?Incorrect.
You are only one who can provide the information that was requested in this thread.
Please see the FAQ, read the instructions and provide the necessary information.
Re: 3. How to improve the performance of my query? / My query is running slow.
Similar Messages
-
Need help in Performance tuning for function...
Hi all,
I am using the below algorithm for calculating the Luhn Alogorithm to calculate the 15th luhn digit for an IMEI (Phone Sim Card).
But the below function is taking about 6 min for 5 million records. I had 170 million records in a table want to calculate the luhn digit for all of them which might take up to 4-5 hours.Please help me performance tuning (better way or better logic for luhn calculation) to the below function.
A wikipedia link is provided for the luhn algorithm below
Create or Replace FUNCTION AddLuhnToIMEI (LuhnPrimitive VARCHAR2)
RETURN VARCHAR2
AS
Index_no NUMBER (2) := LENGTH (LuhnPrimitive);
Multiplier NUMBER (1) := 2;
Total_Sum NUMBER (4) := 0;
Plus NUMBER (2);
ReturnLuhn VARCHAR2 (25);
BEGIN
WHILE Index_no >= 1
LOOP
Plus := Multiplier * (TO_NUMBER (SUBSTR (LuhnPrimitive, Index_no, 1)));
Multiplier := (3 - Multiplier);
Total_Sum := Total_Sum + TO_NUMBER (TRUNC ( (Plus / 10))) + MOD (Plus, 10);
Index_no := Index_no - 1;
END LOOP;
ReturnLuhn := LuhnPrimitive || CASE
WHEN MOD (Total_Sum, 10) = 0 THEN '0'
ELSE TO_CHAR (10 - MOD (Total_Sum, 10))
END;
RETURN ReturnLuhn;
EXCEPTION
WHEN OTHERS
THEN
RETURN (LuhnPrimitive);
END AddLuhnToIMEI;
http://en.wikipedia.org/wiki/Luhn_algorithmAny sort of help is much appreciated....
Thanks
RedeThere is a not needed to_number function in it. TRUNC will already return a number.
Also the MOD function can be avoided at some steps. Since multiplying by 2 will never be higher then 18 you can speed up the calculation with this.
create or replace
FUNCTION AddLuhnToIMEI_fast (LuhnPrimitive VARCHAR2)
RETURN VARCHAR2
AS
Index_no pls_Integer;
Multiplier pls_Integer := 2;
Total_Sum pls_Integer := 0;
Plus pls_Integer;
rest pls_integer;
ReturnLuhn VARCHAR2 (25);
BEGIN
for Index_no in reverse 1..LENGTH (LuhnPrimitive) LOOP
Plus := Multiplier * TO_NUMBER (SUBSTR (LuhnPrimitive, Index_no, 1));
Multiplier := 3 - Multiplier;
if Plus < 10 then
Total_Sum := Total_Sum + Plus ;
else
Total_Sum := Total_Sum + Plus - 9;
end if;
END LOOP;
rest := MOD (Total_Sum, 10);
ReturnLuhn := LuhnPrimitive || CASE WHEN rest = 0 THEN '0' ELSE TO_CHAR (10 - rest) END;
RETURN ReturnLuhn;
END AddLuhnToIMEI_fast;
/My tests gave an improvement for about 40%.
The next step to try could be to use native complilation on this function. This can give an additional big boost.
Edited by: Sven W. on Mar 9, 2011 8:11 PM -
MACBOOK: PLS HELP: Slower performance?
Hi there. I've just bought the Macbook Black, Intel Core Duo, 2GHz, 1GB MemoryRam (upgraded), 80GB harddisk, etc etc. I used to have a Powerbook G4.
I'm however disappointed in MacBook. I used some of it's applications, i.e. Comic Strip, iTunes, etc, it was at a reasonable pace, although a tad slower than my old G4. Then I installed MS Office for Mac, and I tried using it's applications, somehow it slowed down considerably. So most applications I use becomes a nightmare coz it takes ages to perform one command! Pls someone tell me, why this is, and what I can do to speed up it's performance?
Another question: when we buy Macbook, is it not supposed to come with all the softwares CDs (Mac OS CD, Apple Applications CDs..etc) too? All I have is the Install CDs.
MacBook Mac OS X (10.4.6)
MacBook Mac OS X (10.4.6)Office works faster right now on a PowerBook G4 because it was written for the G4 processor. The new MacBooks use Intel Core Duo processors that are totally different.
Think of it this way. My primary language is English. I can communicate (run programs) quickly and efficiently in English (My Intel-powered MacBook). I know a little spanish (PPC), but I am far from fluent. In spanish, it takes me longer to come up with the right words to say what I want. And if I hear anything, I have to "translate" it in my head and think about the meaning in english. Rosetta is the "program" on the Intel macs that can "translate" programs from PPC to Intel code. There's a bit of a speed hit and it uses a lot of RAM.
If you use PowerPoint a lot, you might think about looking into apple's iWork suite, which includes a powerpoint-like program called Keynote. Keynote can import PowerPoint files and export to PowerPoint, and it is Intel native so it runs quickly.
The "processor whirring" that you are talking about, I believe is the macbook's fan for cooling, or if it is even more quiet, it is probably the hard drive spinning. The processor itself should not make any noise, although there are some reports of the processors or graphics card making a high-pitched "whine" sound, which I wouldn't necessarily describe as "whirring".
Are you in a place with pretty high ambient temperatures? If it is summer where you are, and you're causing high processor use, the fan is more likely to run, but lower use where it idles a lot, such as when typing emails and light web-surfing shouldn't cause the fan to run noisily all the time. In that situation, I think you might want to call AppleCare and see if your computer needs a repair. They can also walk you through the process of resetting the PRAM and power manager, which may help if you're experiencing weird fan and power irregularities.
Personally, although I have installed and updated the Office 2004 suite on my MacBook, I have not used it much since installing, so I can't tell you how it works for me. I haven't had any moments on my computer where it felt very sluggish, but I am using mostly Universal Binary Intel-native programs. Right now I have Mail.app, Safari, iChat, Parallels (the virtual WIndows XP program), iTunes, and Terminal open with 574MB out of my 2GB of RAM free.
I hope that you can solve this problem! -
Very urgent-----help in performance tuning
hai all,
I had used inner join for getting data from 5 tables.
performance is very low in this case.
now i want to increase the performance. how can i do this.
coding for the select statement is ......
SELECT agpnr bname1 bname2 bpstlz bort01 bstras b~street2
bname1_maco bname2_maco baliasname bispadrbsnd
INTO CORRESPONDING FIELDS OF TABLE it_tab
FROM jgtgpnr AS a
INNER JOIN jgtsadr AS b ON
aadrnr = badrnr
INNER JOIN jjtvm AS c ON
agpnr = ckunnr
INNER JOIN kna1 AS k ON
agpnr = kkunnr
INNER JOIN knvv AS v ON
agpnr = vkunnr
WHERE ( ajktokd = 'MADV' OR ajktokd = 'MADO' )
AND c~vkorg = pr_vkorg
AND v~vkorg = pr_vkorg
AND gpnr IN so_gpnr
AND k~aufsd IN so_block
AND v~aufsd IN so_blck
please give me a good suggesstion for this.
thanks in advance.Hi
Try to use for all entries
Eg
if u have itab1 and itab2.
select vbeln netwr from vbak into table itab1.
if not itab1[] is initial
select vbeln matnr matkl from vbap into table itab2
for all entries in itab1 where vbeln = itab1-vbeln.
endif.
Hope this will help u.
regards
P.Thangaraj -
Need help in Performance tuning
Hi All,
I am facing some performance issues in my program. The program taking a hell lot of time to execute and some times timing out without giving the out put. This is a report program with ALV output. It is handling mainly Sales related data.
The program is fetching a huge volume of data from different tables and processing this bulk data inside the loops several times. In most of the queries I am unable to supply all key fields, because my requirement is like that only. I have many places in my program i am using inner loop and function modules inside loop etc.
Any pointers on this will be a great help.
Regards,
Jijeesh P G1) Make sure that any READ or LOOP inside an outer LOOP accesses the inner table with an appropriate key (either using BINARY search when reading a standard table or using sorted/hashed tables for inner tables only). This helps in most cases.
2) If the tables witdh is more than aprox. 30 bytes LOOP ASSIGNING <wa> may help a bit. Declare <wa> for each table separately using the tables line type (otherway type casting would cost some additional time).
3) You may use FM SAPGUI_PROGRESS_INDICATOR in the outer loops to inform the user while he is waiting.
4) A COMMIT from time to time will reset the measured time for timeout ( and therefore avoids timeouts - do NOT use without checking step 1) ).
4) The programm may use virtual memory if a huge amount of data is selected ( I have seen dumps in due to the fact that nor more disk space was available). So - if STEPS 1)-3) failed - look a the process for rollling in/out). -
Hi,
Can anyone assist me in tuning the below query
Thanks in Advance
A.Gopal
SELECT nvl(sum(p.GRP_ACTUALQUANTITY),0)
FROM GOODSRECEIPTS r, GOODSRECEIPTPOSITIONS p
,reportparameters plt,reportparameters spl,reportparameters mat
WHERE r.GRH_NO = p.GRP_GRH_NO
AND TRUNC(r.GRH_ARRIVAL) BETWEEN NVL(TO_DATE('01-jan-09'), TRUNC(r.GRH_ARRIVAL)) AND NVL(TO_DATE('31-jan-09'), TRUNC(r.GRH_ARRIVAL))
AND (p.GRP_PLT_ID = 'VDN' OR 1 =0)
AND (r.GRH_SPL_ID = '15035122' OR 1 =0)
AND (p.GRP_MAT_ID = '1001360' OR 1 =0)
AND ('01.01.2009' = 'TOTAL' or trunc(r.GRH_ARRIVAL,'mm') = to_date('01.01.2009','dd.mm.yyyy'))
and plt.rep_field = 'PLT_ID' AND plt.rep_id = 'AN_EXC_RAT' AND plt.rep_user = 'ANANTGOP'
and spl.rep_field = 'SPL_ID' AND spl.rep_id = 'AN_EXC_RAT' AND spl.rep_user ='ANANTGOP'
and mat.rep_field = 'MAT_ID' AND mat.rep_id = 'AN_EXC_RAT' AND mat.rep_user = 'ANANTGOP'
and r.GRH_SPL_ID = decode(spl.rep_value,'All',r.GRH_SPL_ID,spl.rep_value)
and p.GRp_plt_ID = decode(plt.rep_value,'All',p.GRp_plt_ID,plt.rep_value)
and p.GRp_mat_ID = decode(mat.rep_value,'All',p.GRp_mat_ID,mat.rep_value)
AND NOT EXISTS (SELECT 1 FROM GOODSRECEIPTUSAGESTATUS u
WHERE p.GRP_GRH_NO = u.GRU_GRP_GRH_NO
AND p.GRP_NO =u.GRU_GRP_NO
AND u.GRU_UST_ID = 'CANCEL')This query is used in my Oracle report. The original query is like beow
SELECT nvl(sum(p.GRP_ACTUALQUANTITY),0)
FROM GOODSRECEIPTS r, GOODSRECEIPTPOSITIONS p
,reportparameters plt,reportparameters spl,reportparameters mat
WHERE r.GRH_NO = p.GRP_GRH_NO
AND TRUNC(r.GRH_ARRIVAL) >= NVL(:l_date_from, TRUNC(r.GRH_ARRIVAL)) AND
TRUNC(r.GRH_ARRIVAL) <=NVL(:l_date_to, TRUNC(r.GRH_ARRIVAL))
AND (p.GRP_PLT_ID = :p_plt_id OR :ip_plt_group =0)
AND (r.GRH_SPL_ID = :p_spl_id OR :ip_spl_group =0)
AND (p.GRP_MAT_ID = :p_mat_id OR :ip_mat_group =0)
AND (:l_flag = 'TOTAL' or trunc(r.GRH_ARRIVAL,'mm') = to_date(:p_month_abc_sp,'dd.mm.yyyy'))
and plt.rep_field = 'PLT_ID' AND plt.rep_id = :ip_rep_id AND plt.rep_user = :ip_rep_user
and spl.rep_field = 'SPL_ID' AND spl.rep_id = :ip_rep_id AND spl.rep_user = :ip_rep_user
and mat.rep_field = 'MAT_ID' AND mat.rep_id = :ip_rep_id AND mat.rep_user = :ip_rep_user
and r.GRH_SPL_ID = decode(spl.rep_value,'All',r.GRH_SPL_ID,spl.rep_value)
and p.GRp_plt_ID = decode(plt.rep_value,'All',p.GRp_plt_ID,plt.rep_value)
and p.GRp_mat_ID = decode(mat.rep_value,'All',p.GRp_mat_ID,mat.rep_value)
AND NOT EXISTS (SELECT 1
FROM GOODSRECEIPTUSAGESTATUS u
WHERE p.GRP_GRH_NO = u.GRU_GRP_GRH_NO
AND p.GRP_NO =u.GRU_GRP_NO
AND u.GRU_UST_ID = 'CANCEL');
:ip_rep_id = 'AN_EXC_RAT'
:ip_rep_user = 'ANANTGOP
Value of :l_flag = '01.01.2009'
(:p_month_abc_sp = '01.01.2009'
Thanks
A.Gopal -
Pls help me for tuning the querry
Hi Team,
Can any one help me to tune the query below.
The table STG_INT_CASHFLOWS has 20 lahks record with index created for PAYMENTDATE,DEALNUMBER,PAYRECEIVEIND.
Is there any other way like collecting into array and finding the values etc..
SELECT '1'
FROM STG_INT_CASHFLOWS
WHERE PAYMENTDATE < :B4
AND PAYMENTDATE > TO_CHAR (:B3, 'YYYYMMDD')
AND DEALNUMBER = :B2
AND PAYRECEIVEIND = :B1
AND ROWNUM = 1
Thanks.Logic of my code below.
For test in(
select * from STG_INT_CASHFLOWS ORDER BY dealnumber, payreceiveind, TO_DATE (TRIM (paymentdate), 'yyyymmdd')) Loop
SELECT 0 into Varibale
FROM STG_INT_CASHFLOWS
WHERE PAYMENTDATE < test.PAYMENTDATE
AND PAYMENTDATE > TO_CHAR (sysdate, 'YYYYMMDD')
AND DEALNUMBER = test.dealnumber
AND PAYRECEIVEIND = test.PAYRECEIVEIND
AND ROWNUM = 1
We have some other logice below and select statement used using the cursor values.
End loop;
But we face only performace issue with the main cursor with order by clause. But as per logic order by clause cannot be removed. we will use th select staement mentioned. -
Need help with Performance Tuning
Following query takes 8 secs. Any help will be appreciated
SELECT SUM(FuturesMarketVal) FuturesMarketVal
FROM (SELECT CASE WHEN null IS NULL THEN FuturesMarketVal
ELSE DECODE(FUTURES_NAME, null, FuturesMarketVal, 0)
END FuturesMarketVal
FROM (SELECT SUM( (a.FUTURES_ALLOC * (NVL(b.Futures_EOD_Price,0)/100 - NVL(c.Futures_EOD_Price,0)/100) * a.CONTRACT_SIZE) / DECODE(a.CONTRACT_SIZE,100000,1,1000000,4,3000000,12,1) ) FuturesMarketVal,
a.FUTURES_NAME
FROM cms_futures_trans a,
cms_futures_price b,
cms_futures_price c
Where c.history_date (+) = TO_DATE(fas_pas_pkg.get_weekday(to_date('12/30/2005') - 1),'mm/dd/yyyy')
and a.FUTURES_NAME = b.FUTURES_NAME (+)
AND a.trade_date < TO_DATE('12/30/2005','mm/dd/yyyy')
AND b.history_date (+) = TO_DATE('12/30/2005','mm/dd/yyyy')
AND a.FUTURES_NAME = c.FUTURES_NAME (+)
GROUP BY a.FUTURES_NAME
/Eric:
But there are only 5 records in cms_futures_price and 10 in cms_futures_trans :-)
OP:
I'm not usre what you are trying to fo here, but a couple of comments.
Since NULL IS NULL will always be true, you don;t really need the CASE statement. as it stands, your query will always return FuturesMarketVal. If the results are correct, then you can do without the DECODE as well.
Why are you calling fas_pas_pkg.get_weekday with a constant value? Can you not just use whatever it returns as a constant instead of calling the function?
Are you sure you need all those outer joins? They almost guarantee full scans of the outer joined tables.
Perhaps if you post some representative data from the two tables and an explanation of what you are trying to accomplish someone may have a better idea.
John -
Pls help in performance issue.
Suppose I have one table tmp_test and it contains 3 records...
ex
15/11/2007 25/11/2007 50
05/01/2007 10/01/2007 100
05/01/2007 10/12/2007 20
and I fire one query
SELECT DISTINCT from_Date+LEVEL-1 AS TRAN_DATE,qty , LEVEL FROM
(SELECT from_DATE, TO_DATE,qty FROM tmp_test)
CONNECT BY LEVEL <=TO_DATE-from_DATE+1
it shows me proper output i.e. 351 rows
But it takes around 10 mins to execute. can we reduce execution time?
Thaks and Regards...
Prashant T.Firstly I would advise you to visit the following thread;
When your query takes too long ...
You need to post the explain plans, etc.
You should give details like the database version.
Adith -
Oracle Application Performance Tuning
Hello all,
Please forgive me if I am asking this in the wrong section.
I am a s/w engineer with 2 years of exp. I have been working as a performance tuning resource for Oracle EBS in my company. The work mostly involved SQL tuning and dealing with indexes etc. In this time I took up interest in DBA stuff and I completed my OCA in Oracle 10g. Now my comany is giving me an oppurtunity to move into an Application DBA team and I am totally confused about it.
Becoming an Apps DBA will mean that the effort I put into the certification in 10g will be of no use. There are other papers for Apps DBA certification. Should I stay put in performance tuning & wait for a Core DBA chance or shall I accept the Apps DBA oppurtunity.
Also, does my exp. in SQL performace tuning hold any value as such with out an exposure to DBA activities?
Kindly guide me in this regards as I am very confused at this juncture.
Regards,
JithinJithin wrote:
Hello bigdelboy , Thank you for your reply.
Yes, By oracle Apps DBA I meant Oracle EBS.
Clearing 1Z0-046 is an option. However, my doubt is will clearing both the exams Admin I and Admin II be of any help without having practical expericnce? The EBS DBA work involves support and patching, cloning, and new node setup etc.
Also, is my performance tuning experience going to help me in any way in the journey forward as a DBA/ EBS DBA?
Thank you for your valuable time.
Regards,
Jithin SarathThe way I read it is this.
People notice you are capable of understanding and performance tuning SQL. And you must have some knowledge of Oracle EBS. And in fact you also have a DBA OCA.
So there is a 98% + chance you can be made into a good Oracle Apps DBA (and core DBA). If I was in their position I'd want you on my team too; this is the way we used to bring on DBA's in the old days before certification and it has a lot of merit still. Okay you can only do limited tasks at first ... but the number of taks you can do will increase dramatically over a number of months.
I would imagine the Oracle Apps DBA will be delighted to have someone on board who can performance tune SQL which sometimes can sometimes seem more like an art than a science. The patching etc can be taught in small doses. If they are a good team they wont try to give you everything at once, they'll get you to learn one procedure at a time.
And remember, if in doubt ask; and if you dont understand ask again. And be safe rather than sorry on actions that could be critial.
If your worried about liinux: Linux Recipes For Oracle Dbas (Apress) might be a good book to read but could be expensive in India
Likewise: (Oracle Applications Dba Field Guide) may suit and even (Rman Recipes For Oracle Database 11 G: A Problem-solution Approach) may have some value if you need to get up to speed quickly in those areas.
These are not perfect but they sometimes consolidate the information neatly; however only buy if you feel they are cheap enough. You may well buy them and feel disappointed (These all happen to be by Apress who seem to have produced a number of good books ... they've also published some rubbish as well)
And go over the 2-day dba examples as well and linux install examples n OTN as well ... they are free compared to the books I mentioned.
Rgds -bigdelboy. -
Steps for performance Tuning....!!!!
Hi all,
I need your help in Performance tuning.
While we do tuning in Oracle, apart from Indexes, where clause and order by clause, what are the other points we need to check. I mean explain plan etc...
I am working as Informatica Developer, but i need to make an documents which points out what are the step we can check while doing performance tuning on SQL queries.
Thanks in advance for your help.Hi,
have a look into these link.it may helpful to you.
When your query takes too long .
When your query takes too long ...
* HOW TO Post a SQL statement tuning request template posting *
HOW TO: Post a SQL statement tuning request - template posting
Edited by: Ravi291283 on Jul 28, 2009 4:00 AM
Edited by: Ravi291283 on Jul 28, 2009 4:01 AM
Edited by: Ravi291283 on Jul 28, 2009 4:02 AM -
Hi,
I need some help in performing tuning of a big query. Explain plan is as under:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
Edited by: AbdulHadi on Sep 16, 2011 3:56 PM
Edited by: AHadi on Sep 19, 2011 10:02 AM3 SORT GROUP BY 47916 25M 491G 15M (3) 17:30:31
4 VIEW 870M 445G 15M (2) 17:24:08
5 HASH GROUP BY 870M 427G 885G 15M (2) 17:24:08
In above steps its using very high temporary tablespace usage. please try to tune your query.
- dynamic sampling used for this statement
The statistics appears to be stale. -
Performance tuning in PL/SQL code
Hi,
I am working on already existing PL/SQL code which is written by someone else on validation and conversion of data from a temporary table to base table. It usually has 3.5 million rows. and the procedure takes arount 2.5 - 3 hrs to complete.
Can I enhance the PL/SQL code for better performance ? or, is this OK to take so long to process these many rows?
Thanks!
YoginiCan I enhance the PL/SQL code for better performance ? Probably you can enhance it.
or, is this OK to take so long to process these many rows? It should take a few minutes, not several hours.
But please provide some more details like your database version etc.
I suggest to TRACE the session that executes the PL/SQL code, with WAIT events, so you'll see where and on what time is spent, you'll identify your 'problem statements very quickly' (after you or your DBA have TKPROF'ed the trace file).
SQL> alter session set events '10046 trace name context forever, level 12';
SQL> execute your PL/SQL code here
SQL> exitWill give you a .trc file in your udump directory on the server.
http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
Also this informative thread can give you more ideas:
HOW TO: Post a SQL statement tuning request - template posting
as well as doing a search on 10046 at AskTom, http://asktom.oracle.com will give you more examples.
and reading Oracle's Performance Tuning Guide: http://www.oracle.com/pls/db102/to_toc?pathname=server.102%2Fb14211%2Ftoc.htm&remark=portal+%28Getting+Started%29 -
We have to inverstigate about a reporting solution where things are getting slow (may be material, database design, network matters).
I have red a lot in MSDN and some books about performance tuning on SQL Server 2008 R2 (or other) but frankly, I feel a little lost in all that stuff
I'am looking for practical steps in order to do the tuning. Someone had like a recipe for that : a success story...
My (brain storm) Methodology should follow these steps:
Resource bottlenecks: CPU, memory, and I/O bottlenecks
tempdb bottlenecks
A slow-running user query : Missing indexes, statistics,...
Use performance counters : there are many, can one give us the list of the most important
how to do fine tuning about SQL Server configuration
SSRS, SSIS configuration ?
And do the recommandations.
Thanks
"there is no Royal Road to Mathematics, in other words, that I have only a very small head and must live with it..."
Edsger W. DijkstraHello,
There is no clear defined step which can be categorized as step by step to performance tuning.Your first goal is to find out cause or drill down to factor causing slowness of SQL server it can be poorly written query ,missing indexes,outdated stats.RAM crunch
CPU crunch so on and so forth.
I generally refer to below doc for SQL server tuning
http://technet.microsoft.com/en-us/library/dd672789(v=sql.100).aspx
For SSIS tuning i refer below doc.
http://technet.microsoft.com/library/Cc966529#ECAA
http://msdn.microsoft.com/en-us/library/ms137622(v=sql.105).aspx
When I face issue i generally look at wait stats ,wait stats give you idea about on what resource query was waiting.
--By Jonathan KehayiasSELECT TOP 10
wait_type ,
max_wait_time_ms wait_time_ms ,
signal_wait_time_ms ,
wait_time_ms - signal_wait_time_ms AS resource_wait_time_ms ,
100.0 * wait_time_ms / SUM(wait_time_ms) OVER ( )
AS percent_total_waits ,
100.0 * signal_wait_time_ms / SUM(signal_wait_time_ms) OVER ( )
AS percent_total_signal_waits ,
100.0 * ( wait_time_ms - signal_wait_time_ms )
/ SUM(wait_time_ms) OVER ( ) AS percent_total_resource_waits
FROM sys.dm_os_wait_stats
WHERE wait_time_ms > 0 -- remove zero wait_time
AND wait_type NOT IN -- filter out additional irrelevant waits
( 'SLEEP_TASK', 'BROKER_TASK_STOP', 'BROKER_TO_FLUSH',
'SQLTRACE_BUFFER_FLUSH','CLR_AUTO_EVENT', 'CLR_MANUAL_EVENT',
'LAZYWRITER_SLEEP', 'SLEEP_SYSTEMTASK', 'SLEEP_BPOOL_FLUSH',
'BROKER_EVENTHANDLER', 'XE_DISPATCHER_WAIT', 'FT_IFTSHC_MUTEX',
'CHECKPOINT_QUEUE', 'FT_IFTS_SCHEDULER_IDLE_WAIT',
'BROKER_TRANSMITTER', 'FT_IFTSHC_MUTEX', 'KSOURCE_WAKEUP',
'LAZYWRITER_SLEEP', 'LOGMGR_QUEUE', 'ONDEMAND_TASK_QUEUE',
'REQUEST_FOR_DEADLOCK_SEARCH', 'XE_TIMER_EVENT', 'BAD_PAGE_PROCESS',
'DBMIRROR_EVENTS_QUEUE', 'BROKER_RECEIVE_WAITFOR',
'PREEMPTIVE_OS_GETPROCADDRESS', 'PREEMPTIVE_OS_AUTHENTICATIONOPS',
'WAITFOR', 'DISPATCHER_QUEUE_SEMAPHORE', 'XE_DISPATCHER_JOIN',
'RESOURCE_QUEUE' )
ORDER BY wait_time_ms DESC
use below link to analyze wait stats
http://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/
HTH
PS: for reporting services you can post in SSRS forum
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
hello friends,
i am supposed to use ST05 and SE30 to do performance tuning,and also perform cost estimation,
can some plz help me understand, i am not that good at reading large paragraphs, so plz donot give me links to help.sap
thank you.Hi
Se30 is the runtime analysis
Here it will give you detailed graph about your program .
abap time,database time application time ..
st05 is sql trace where it will give you individual select stmnts in your program
and also proper index is being used or not.
Other performance tips
check any select stmnts inside the loop and replace with read statement
use binary search in read stmnts
use proper index in where condition in select stmnt.
if you want to execute st05..go st05..trace on-execute ur program--come to st05..trace off and --list trace...
you get summary details of select queires and it will be pink or other color.
Thanks
Maybe you are looking for
-
hi im looking into puttin an airport card in to my mac g4 the lamp desktop and was wondering if i need extra memory and what osx it would run on hope someone ca
-
Base64 Encoding in SOA 11.1.1.5.0
Hi All, For writing a String to a Flat File(Opaque Schema) using FileAdapter the string needs to be converted to Base64 Encoding I am not able to Encode the string to base64 in BPEL 11g. JDEVELOPER VERSION.Studio Edition Version 11.1.1.5.0 SOA Suite
-
Hi, I am pretty new in CRM, so this might sound a rather basic question. We would like to change the default due date of a transaction type SLFN (SRV_CUST_END) from "Start + 3 days" into a constant ('31/12/9999"). Can anyone tell me what transactions
-
Flash viewing on iphone and ipad
Hi, Can anyone help me with a dilemma. I have an iPhone and when using the web (safari) I can not view flash files. Example, when I go to sky.com and try and watch the news live, it says that I need to download the adobe flash player. When I try and
-
Can i change the text of submit button on a login box of a secure zone?
Can i change the text of the submit button in the login box of a secure zone? Or, maybe, i can replace the button with the image? So, can this be done, and how to achieve this? Any suggestions are welcome.