How to tune waits as per given statspaack output here
Hi
Following is the out put of statspack.
can anywone help to resolve this
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
CPU time 3,131 95.03
log file sync 18,477 55 1.67
log file parallel write 18,981 49 1.50
db file parallel write 648 29 .89
db file sequential read 1,617 13 .38
^LWait Events for DB: MPLSDB Instance: mplsdb Snaps: 7 -8
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Hmmm.....
Sorry Sybrand, I have to disagree with you. I would say there's too little information to determine if there's a problem.
It's quite possible that the posted load profile is from a system that's humming along, with no concerns. A system with a majority of the data cached, and SQL statements run quickly.
It's also possible that the system is suffering from CPU shortage, and there are SQLs that could stand to be tuned, to take advantage of better access paths, and do less logical I/O, there by burning less CPU. Or, it could be an application design problem, where the individual SQLs are all well tuned, but the application design needs to be modified to call those SQLs less frequently.
I'd argue that either of the above scenarios could be true, and based on the scant amount of information provided in the original post, it's impossible to tell.
For a clearer picture, we'd need to know:
- What's happening at the O/S level, in terms of CPU usage, runqueues, etc
- How is the system responding to various users' business tasks? Are they happy? Are they feeling pain?
-Mark
Similar Messages
-
How to Tune EM Metric Alert "Average Users Waiting Count"?
We have been getting below EM alert frequently , How can tune/fix this issue?
Metric=Average Users Waiting Count
Wait Class=Concurrency
Severity=Warning
Message=Metrics "Average Users Waiting Counts" is at 84.66522 for event class "Concurrency"Have a look at this to understand the Metrics first.
Average Users Waiting Count
<br>
Oracle Database FAQs
</br> -
What this SQL did is to generate a report like how many rows for each tp_stts when ims_toms_msge_type='TOMS NEW' (or 'TOMS CNCLO'). also, its corresponding total number for each ims_toms_msge_type.
Here is the sample:
Rownum H1 TP_STTS COUNT IMS_TOMS_MSGE_TYPE H FILTERTYPE
1 Trades Block Key Data Error 594 TOMS NEW A MSL
2 Allocation Data Error 334 TOMS NEW A MSL
3 Manual Processing Required 29 TOMS NEW A MSL
4 Manual Removal No Processing Required 67 TOMS NEW A MSL
5 Waiting For Authorization 2 TOMS NEW A MSL
6 Auto NAK 19764 TOMS NEW B SLS
7 Validated 165023 TOMS NEW B SLS
8 GRAND TOTAL 185813 TOMS NEW H MSL
9 Cancel Auto NAK 37 TOMS CNCLO X MSL
10 Manual Processing Required 114 TOMS CNCLO X MSL
11 Manually Processed 278 TOMS CNCLO X MSL
12 CANCEL GRAND TOTAL 429 TOMS CNCLO Z MSLSQL statement as below:
SELECT ROWNUM, MSGS.* FROM (with FTMReport as (
select tp_stts, ims_toms_msge_type, count(*) count from ims_trde, ims_toms_msge
where ( IMS_TRDE.PRCSG_GRP_ID = 5 ) AND ( IMS_TRDE.IMS_TRDE_RCPT_DTTM >= TO_DATE('12/01/2009 00:00', 'MM/DD/YYYY HH24:MI') AND IMS_TRDE.IMS_TRDE_RCPT_DTTM <= (TO_DATE('12/28/2009 23:59', 'MM/DD/YYYY HH24:MI')) ) AND (IMS_TRDE.GRS_TRX_TYPE NOT IN ('INJECTION','WITHDRAWAL','PAYMENT') OR IMS_TRDE.GRS_TRX_TYPE IS NULL) AND (IMS_TRDE.SSC_INVST_TYPE != 'FC' OR IMS_TRDE.SSC_INVST_TYPE IS NULL) AND (IMS_TRDE.SERVICE_TYPE='FS' OR IMS_TRDE.SERVICE_TYPE='CO') AND 1=1
and IMS_TRDE.SERVICE_TYPE='FS' and 1=1 and ims_trde.ims_trde_oid = ims_toms_msge.ims_trde_oid
group by tp_stts, ims_toms_msge_type
select 'GRAND TOTAL' H1, null tp_stts, sum(Count) count , ims_toms_msge_type ,'H', 'MSL' FilterType
from FTMReport where ims_toms_msge_type in ('TOMS NEW') group by ims_toms_msge_type
union
select 'CANCEL GRAND TOTAL' H1, null tp_stts, sum(Count) count, ims_toms_msge_type ,'Z', 'MSL' FilterType
from FTMReport where ims_toms_msge_type in ('TOMS CNCLO') group by ims_toms_msge_type
union
select DECODE(rownum, 1, 'Trades') H1, tp_stts, count, ims_toms_msge_type , 'A' , 'MSL' FilterType
from FTMReport where ims_toms_msge_type in ('TOMS NEW') and tp_stts not in ('Validated','Auto NAK','Manual NAK')
union
select ' ' H1, tp_stts, count, ims_toms_msge_type , 'B' , 'SLS' FilterType
from FTMReport where ims_toms_msge_type in ('TOMS NEW') and tp_stts in ('Validated','Auto NAK','Manual NAK')
union
select DECODE(rownum, 1, 'Cancel') H1, tp_stts, count, ims_toms_msge_type , 'X' , 'MSL' FilterType
from FTMReport where ims_toms_msge_type in ('TOMS CNCLO') order by 5,6
) MSGS;Explain plan as below:
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 193 | 12738 | 32 |
| 1 | COUNT | | | | |
| 2 | VIEW | | 193 | 12738 | 32 |
| 4 | TEMP TABLE TRANSFORMATION | | | | |
| 3 | RECURSIVE EXECUTION | SYS_LE_4_0 | | | |
| 0 | INSERT STATEMENT | | 61 | 4575 | 9264 |
| 1 | LOAD AS SELECT | | | | |
| 2 | SORT GROUP BY | | 61 | 4575 | 9264 |
| 3 | NESTED LOOPS | | 1604 | 117K| 9251 |
|* 4 | TABLE ACCESS BY INDEX ROWID| IMS_TRDE | 1603 | 80150 | 6045 |
|* 5 | INDEX RANGE SCAN | IMS_TRDE_INDX4 | 539K| | 3917 |
|* 6 | INDEX RANGE SCAN | IMS_TOMS_MSGE_INDX1 | 1 | 25 | 2 |
| 5 | SORT UNIQUE | | 193 | 8831 | 30 |
| 6 | UNION-ALL | | | | |
| 7 | SORT GROUP BY NOSORT | | 5 | 115 | 6 |
|* 8 | VIEW | | 61 | 1403 | 2 |
| 9 | TABLE ACCESS FULL | SYS_TEMP_0FD9D660F_B198D56F | 61 | 2074 | 2 |
| 10 | SORT GROUP BY NOSORT | | 5 | 115 | 6 |
|* 11 | VIEW | | 61 | 1403 | 2 |
| 12 | TABLE ACCESS FULL | SYS_TEMP_0FD9D660F_B198D56F | 61 | 2074 | 2 |
| 13 | COUNT | | | | |
|* 14 | VIEW | | 61 | 2867 | 2 |
| 15 | TABLE ACCESS FULL | SYS_TEMP_0FD9D660F_B198D56F | 61 | 2074 | 2 |
|* 16 | VIEW | | 61 | 2867 | 2 |
| 17 | TABLE ACCESS FULL | SYS_TEMP_0FD9D660F_B198D56F | 61 | 2074 | 2 |
| 18 | COUNT | | | | |
|* 19 | VIEW | | 61 | 2867 | 2 |
| 20 | TABLE ACCESS FULL | SYS_TEMP_0FD9D660F_B198D56F | 61 | 2074 | 2 |
Predicate Information (identified by operation id):
4 - filter(("IMS_TRDE"."GRS_TRX_TYPE"<>'INJECTION' AND "IMS_TRDE"."GRS_TRX_TYPE"<>'WITHDRAWAL'
AND "IMS_TRDE"."GRS_TRX_TYPE"<>'PAYMENT' OR "IMS_TRDE"."GRS_TRX_TYPE" IS NULL) AND
("IMS_TRDE"."SSC_INVST_TYPE"<>'FC' OR "IMS_TRDE"."SSC_INVST_TYPE" IS NULL))
5 - access("IMS_TRDE"."IMS_TRDE_RCPT_DTTM">=TO_DATE(' 2009-12-01 00:00:00', 'syyyy-mm-dd
hh24:mi:ss') AND "IMS_TRDE"."PRCSG_GRP_ID"=5 AND "IMS_TRDE"."SERVICE_TYPE"='FS' AND
"IMS_TRDE"."IMS_TRDE_RCPT_DTTM"<=TO_DATE(' 2009-12-28 23:59:00', 'syyyy-mm-dd hh24:mi:ss'))
filter("IMS_TRDE"."PRCSG_GRP_ID"=5 AND "IMS_TRDE"."SERVICE_TYPE"='FS')
6 - access("IMS_TRDE"."IMS_TRDE_OID"="IMS_TOMS_MSGE"."IMS_TRDE_OID")
8 - filter("FTMREPORT"."IMS_TOMS_MSGE_TYPE"='TOMS NEW')
11 - filter("FTMREPORT"."IMS_TOMS_MSGE_TYPE"='TOMS CNCLO')
14 - filter("FTMREPORT"."IMS_TOMS_MSGE_TYPE"='TOMS NEW' AND "FTMREPORT"."TP_STTS"<>'Validated'
AND "FTMREPORT"."TP_STTS"<>'Auto NAK' AND "FTMREPORT"."TP_STTS"<>'Manual NAK')
16 - filter("FTMREPORT"."IMS_TOMS_MSGE_TYPE"='TOMS NEW' AND ("FTMREPORT"."TP_STTS"='Auto NAK' OR
"FTMREPORT"."TP_STTS"='Manual NAK' OR "FTMREPORT"."TP_STTS"='Validated'))
19 - filter("FTMREPORT"."IMS_TOMS_MSGE_TYPE"='TOMS CNCLO')
Note: cpu costing is offCould you guys tell me what is wrong with this sql and how to tune it?
Is there any way to replace the UNION? Is using UNION a good idea?
Can I use DECODE or CASE WHEN to simplify it? How?
Also, could you help explain why there is SYS_LE_4_0, SYS_TEMP_0FD9D660F_B198D56F temporary segment? Is it caused by with FTMReport as ?
Thanks
Edited by: PhoenixBai on Dec 31, 2009 9:58 AM
Edited by: PhoenixBai on Dec 31, 2009 12:08 PM
Edited by: PhoenixBai on Dec 31, 2009 12:17 PMI consider using GROUP BY ROLLUP together with DECODE, CASE WHEN, but haven`t come out with a working sql yet:-(Some sample data to work with would have been much helpful. But we dont get that most of the time :(
I came up with this.
select case when ims_toms_msge_type = 'TOMS NEW' then
case when grouping(tp_stts) = 1 then 'GRAND TOTAL'
when tp_stts not in ('Validated','Auto NAK','Manual NAK') then 'Trades'
end
when ims_toms_msge_type = 'TOMS CNCLO' then
case when grouping(tp_stts) = 1 then 'CANCEL GRAND TOTAL'
when tp_stts in ('Validated','Auto NAK','Manual NAK') then 'Cancel'
end
end h1,
tp_stts,
count(*) count,
ims_toms_msge_type,
case when ims_toms_msge_type = 'TOMS NEW' then
case when grouping(tp_stts) = 1 then 'H'
when tp_stts not in ('Validated','Auto NAK','Manual NAK') then 'A'
end
when ims_toms_msge_type = 'TOMS CNCLO' then
case when grouping(tp_stts) = 1 then 'Z'
when tp_stts in ('Validated','Auto NAK','Manual NAK') then 'B'
end
end flag,
'MSL' FilterType
from ims_trde,
ims_toms_msge
where IMS_TRDE.PRCSG_GRP_ID = 5
AND IMS_TRDE.IMS_TRDE_RCPT_DTTM >= TO_DATE('12/01/2009 00:00', 'MM/DD/YYYY HH24:MI')
AND IMS_TRDE.IMS_TRDE_RCPT_DTTM <= TO_DATE('12/28/2009 23:59', 'MM/DD/YYYY HH24:MI')
AND (IMS_TRDE.GRS_TRX_TYPE NOT IN ('INJECTION','WITHDRAWAL','PAYMENT')
OR IMS_TRDE.GRS_TRX_TYPE IS NULL)
AND (IMS_TRDE.SSC_INVST_TYPE != 'FC'
OR IMS_TRDE.SSC_INVST_TYPE IS NULL)
AND (IMS_TRDE.SERVICE_TYPE = 'FS'
OR IMS_TRDE.SERVICE_TYPE = 'CO')
AND 1=1
and IMS_TRDE.SERVICE_TYPE = 'FS'
and 1=1
and ims_trde.ims_trde_oid = ims_toms_msge.ims_trde_oid
group by rollup(ims_toms_msge_type, tp_stts)Not sure if this code works. Because i dint have the table or the data to test it. So if it has some error just fix it and give it a try. Do post the kind of output it gives. So that we can see if we can work with this solution. -
How to tune the query...?
Hi all,
I am having a table with millions of records and the query is taking hours
time. How to tune the query apart from doing the following things.
1. Creating or Deleting indexes.
2. Using Bind variables.
3. Using Hints.
4. Updating the Statitics regurarly.
Actually, i have asked this question in interview how to tune the query.
I told him the above 4 things. Then he told, these are not working, then
how you will tune this query.
Thanks in advance,
Paluser546710 wrote:
Actually, i have asked this question in interview how to tune the query.
I told him the above 4 things. Then he told, these are not working, then
how you will tune this query.It actually depends on the scenario/problem given.
You may want to read this first.
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 -
How to tune "Buffer Get" offender
QUESTION: How to tune following sql
SELECT *
FROM trans
WHERE accountid = NVL (NULL, accountid)
AND transtypeid = 171
AND NVL (description, '-1') = NVL ('Card Activation Fee ', '-1')
AND ABS (transamt) = ABS (9.95)
AND accountid <> 7689966
AND postdate BETWEEN ( TO_DATE ('03/14/2006 00:17:43',
'mm/dd/yyyy hh24:mi:ss'
- .00011574
AND ( TO_DATE ('03/14/2006 00:17:53',
'mm/dd/yyyy hh24:mi:ss'
+ .00011574
DETAILS:
Statspack has shown this piece of SQL as the largest contender for "Buffer Gets" chewing up 513.28 seconds of CPU time out of 3,475 (See Top 5 Timed Events below)
However, when I run the sql statement by itself in TOAD, it takes 90ms to complete and has a cost of 202 (See plan below). TRANS table has over 18m rows.
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=CHOOSE 1 202
TABLE ACCESS BY INDEX ROWID SVOLTP.TRANS 1 65 202
INDEX RANGE SCAN SVOLTP.TRANS_POSTDATE_NIDX 1 K 7
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
CPU time 3,475 49.99
db file sequential read 1,340,884 3,197 45.99
db file scattered read 180,048 70 1.01
db file parallel write 3,983 49 .70
log file sync 20,593 43 .63here is the actual statement taken from the package:
select transid
into lFromTransID
from trans
where accountid = nvl(lacctid, accountid)
and transtypeid = lToTrans.transtypeid
and nvl(description, '-1') = nvl(lToTrans.description, '-1')
and abs(transamt) = abs(lToTrans.transamt)
and accountid <> lToTrans.accountid
-- Transactions must be posted within 10 seconds of each other
and postdate between (lToTrans.postdate - .00011574) and (lToTrans.postdate + .00011574); -
EWA - IO Performance - Wait Time per Read (ms)
Dear Forum,
How is the formula to calculate 'Wait Time per Read (ms)' in EWA report in section IO Performance?
Regards,
AgoesNo answer...
-
Can any one please let me know, how to tune the following wait events i am getting frequently
Event Name Total Waits u Total Timeouts Time Waited Average Wait Max Wait Time Waited Micro
log file sync 395826 0 70461 0 31 704608142
lacth free 335758 0 37132 0 25 371324812Check here:
[http://orainternals.wordpress.com/2008/07/07/tuning-log-file-sync-wait-events]
[http://orainternals.wordpress.com/2008/11/24/log-file-synch-tuning-2]
[http://www.pythian.com/news/1098/tuning-log-file-sync-event-waits]
Latch free and log file sync wait event
HTH
-Anantha
External isn't working. ?:|
Edited by: Anantha R on Feb 9, 2010 3:17 PM -
How to get classification for a given material and material type in MM
Hello Friends,
One of my developer colleagues is struggling to find out : how to get classification for a given material and material type in MM?
He is looking for probable table and table fields to Select from.
I would appreciate seriously any help in this regard.
~Yours SincerelyHi
Below given the flow and table details for a given class and class type.
- Table KLAH --> This contains the "Internal class no" [ for the given Class & Class type ]
- Table KSML --> This contains the " internal character numbers " [ nothing but characteristics attached to the class ] , which can be fetched with the above fetched internal class no
- Table AUSP --> This table contains the objects ( material ) attached to the internal characters of that class
- Table CABNT --> This table contains the "Description" for the internal character numbers.
- award points if this is ok -
Query takes long time 41 seconds to run how to tune
my query is simple as follows...i dont know how to tune it..
cur_memb_count (p_as_of_date IN date)
is
select
count(ip.individual_id) membercount,
--lpad(re.region_id,2,'0')||lpad('000',3,'0')||lpad( pb.plan_cd,3,'0') group_id,
substr(pb.plan_cd,1,1)||lpad(re.region_id, 2,'0')||'0000' group_id,
ipp.legal_entity_id,
bus.gl_bus_unit_a,
bus.lob,
loc.gl_loc_nbr_a,
prod.gl_product_cd_a,
prod.gl_fin_argmt_a,pb.plan_type_id ,pb.plan_cd
from
plan pb ,region_map re , state_plan_billing spb,
insured_plan_profile ipp , insured_plan ip ,
ods.oods_gl_bus_unit bus, ods.oods_gl_loc_nbr loc,
ods.oods_gl_product_line prod,
household h,
employer_household eh
where
ipp.residence_st_plan_billing_id = spb.state_plan_billing_id
and ipp.insured_plan_id = ip.insured_plan_id
and ip.plan_cd = pb.plan_cd
and pb.plan_cd=spb.plan_cd
-- and pb.plan_type_id = loc.lob
and spb.state_cd = re.state_cd
and p_as_of_date between ip.insured_plan_effective_date and
nvl(ip.insured_plan_termination_date,'31-dec-9999')
and ip.insured_plan_effective_date <>
nvl(ip.insured_plan_termination_date,'31-dec-9999')
-- the condition below is necessary. but not enough data to test.when
uncommented will only give
-- a few records. try testing it just by uncommenting it.
--and p_as_of_date between re.region_map_start_date and re.region_map_stop_date
and loc.lob=prod.lob and loc.lob=bus.lob(+) and loc.company_cd=bus.company_cd(+)
and p_as_of_date between pb.plan_start_date and pb.plan_stop_date
and p_as_of_date between ipp.ins_plan_profile_start_date and
ipp.ins_plan_profile_stop_date
-- and lpad(re.region_id,2,'0')||lpad('000',3,'0')||lpad(pb.plan_cd,3,'0')
= loc.group_id
and substr(pb.plan_cd,1,
1)||lpad(re.region_id,2,'0')||nvl(employee_id,'0000') =loc.group_id
and p_household_id_param = h.household_id
and h.household_id = eh.employer_household_id
and p_date_param between eh.emp_hhold_start_date and eh.emp_hhold_stop_date
and insplan.individual_id=housmemb.individual_id(+)
and eh.delete_ind = 'N'
group by
--lpad(re.region_id,2,'0')||lpad('000',3,'0')||lpad(pb.plan_cd,3,'0'),
substr(pb.plan_cd ,1,1)||lpad(re.region_id,2, '0')||nvl(employee_id,'0000'),If many full table scans on big tables consider creating indexes. Or if many index reads consider forcing full table scans :)
Ah, I just love these tuning questions. "My query is slow. Please make it go fast". Sure, put on these red shoes, click your heels three times and make a wish. Alas, tuning is rather more complicated than that, more of a science than a voodoo rirtual. We would like to help. But we need more data, some concrete figures. Otherwise we're just guessing.
So, first off, please read the Performance Tuning Guide. Apply some of its techniques. If you still don't understand why your query is running slow, come back to us with table descriptions, volumetrics, indexes, explain plans, stats, timings and tkprof output.
Good luck, APC -
How do I total expenses per month
I am using the check register template in numbers. I added a table to calculate a running total of expenses per category per month. I can get the table to keep a running total of expenses per category, but have not been able to add the per month value. How do I add that part into my formula. Specifically, my formula so far is =SUMIF(Transactions :: $Category,A2,Transactions :: Amount). Now all I need is to add the month value so I can see how much I am spending per month per category.
Transactions
Beginning Balance
$126.37
Type
Date
Description
Category
Amount
Balance
Debit
3/19/12
Gas at Shell
Bills
$ (50.54)
$ 75.83
Debit Card
3/20/12
Starbucks
Starbucks
$ (1.79)
$ 74.04
Debit Card
3/21/12
Freebirds Austin
Food
$ (9.72)
$ 64.32
Debit Card
3/23/12
Smokey Mo’s
Food
$ (7.00)
$ 57.32
Deposit
3/26/12
Deposit
Deposit
$ 100.00
$ 1,444.57
Debit Card
Bills
$ 1,444.57
DEP
Bills
$ 1,444.57
DEP
Bills
$ 1,444.57
Debit Card
Bills
$ 1,444.57
105
Bills
$ 1,444.57
DEP
Bills
$ 1,444.57
Debit Card
Bills
$ 1,444.57
Bills
$ 1,444.57
Here is an example of the checking register table I am building
Category
Amount
Home
$ 0.00
Food
$ (16.72)
Bills
$ (50.54)
Credit Card
$ 0.00
Entertainment
$ 0.00
Starbucks
$ (1.79)
Total
$ (69.05)
And here is an example of the table for "March" that I am building. But, I only want March expenses to add in this table. Once April comes around, I want a new table to show expenses per category for that month.
I am new to this community, to have patience please. -
How long BPM wait for an transport acknowledgement
I have a send step with transport acknowledgement. When receiver system is not available adapter tries 3 times to deliver a message but my BPM has still a status "in work".
How long BPM wait for an transport acknowledgement? Can I configure it? Will this BPM cunsume system resorces?
What is the best strategy for work with transport acknowledgement?> You can add a deadline branch
I don't like this approach... because I can change amount of attempts and period. My BPM will be stopped but message could be delivered later... It will be diffucult to support dedline period in all business process -
HT3754 how to track data usage per app in iPhone
Hi
Anybody know How to get Data usage per app in iphone ?.
Advance Thanks & Regards,
Gokul.In that case app is there like onavo.
-
HI All, How to improve the performance in given query?
HI All,
How to improve the performance in given query?
Query is..
PARAMETERS : p_vbeln type lips-vbeln.
DATA : par_charg TYPE LIPS-CHARG,
par_werks TYPE LIPS-WERKS,
PAR_MBLNR TYPE MSEG-MBLNR .
SELECT SINGLE charg
werks
INTO (par_charg, par_werks)
FROM lips
WHERE vbeln = p_vbeln.
IF par_charg IS NOT INITIAL.
SELECT single max( mblnr )
INTO par_mblnr
FROM mseg
WHERE bwart EQ '101'
AND werks EQ par_werks (index on werks only)
AND charg EQ par_charg.
ENDIF.
Regards
SteveHi steve,
Can't you use the material in your query (and not only the batch)?
I am assuming your system has an index MSEG~M by MANDT + MATNR + WERKS (+ other fields). Depending on your system (how many different materials you have), this will probably speed up the query considerably.
Anyway, in our system we ended up by creating an index by CHARG, but leave as a last option, only if selecting by matnr and werks is not good enough for your scenario.
Hope this helps,
Rui Dantas -
How to Tune the Transactions/ Z - reports /Progr..of High response time
Dear friends,
in <b>ST03</b> work load anlysis menu.... there are some z-reports, transactions, and some programmes are noticed contineously that they are taking the <b>max. response time</b> (and mostly >90%of time is DB Time ).
how to tune the above situation ??
Thank u.Siva,
You can start with some thing like:
ST04 -> Detail Analysis -> SQL Request (look at top disk reads and buffer get SQL statements)
For the top SQL statements identified you'd want to look at the explain plan to determine if the SQL statements is:
1) inefficient
2) are your DB stats up to date on the tables (note up to date stats does not always means they are the best)
3) if there are better indexes available, if not would a more suitable index help?
4) if there are many slow disk reads, is there an I/O issue?
etc...
While you're in ST04 make sure your buffers are sized adequately.
Also make sure your Oracle parameters are set according to this OSS note.
Note 830576 - Parameter recommendations for Oracle 10g -
How to tune the performance of Oracle SQL/XML query?
Hi all,
I am running Oracle 9i and like to run the following Oracle SQL/XML query. It takes about 3+ hour and still not finish. If I get rid all the XML stuffs it only take minutes to run. Does anybody know how to what's the reason of this slow and how to tune it?
SELECT XMLElement("CUSTOMER",
XMLForest(C_CUSTKEY "C_CUSTKEY", C_NAME "C_NAME", C_ADDRESS "C_ADDRESS", C_PHONE "C_PHONE", C_MKTSEGMENT "C_MKTSEGMENT", C_COMMENT "C_COMMENT"),
(SELECT XMLAgg(XMLElement("ORDERS",
XMLForest(O_ORDERKEY "O_ORDERKEY", O_CUSTKEY "O_CUSTKEY", O_ORDERSTATUS "O_ORDERSTATUS", O_ORDERPRIORITY "O_ORDERPRIORITY", O_CLERK "O_CLERK", O_COMMENT "O_COMMENT"),
(SELECT XMLAgg(XMLElement("LINEITEM",
XMLForest(L_ORDERKEY "L_ORDERKEY", L_RETURNFLAG "L_RETURNFLAG", L_LINESTATUS "L_LINESTATUS", L_SHIPINSTRUCT "L_SHIPINSTRUCT", L_SHIPMODE "L_SHIPMODE", L_COMMENT "L_COMMENT")
FROM LINEITEM
WHERE LINEITEM.L_ORDERKEY = ORDERS.O_ORDERKEY)
FROM ORDERS
WHERE ORDERS.O_CUSTKEY = CUSTOMER.C_CUSTKEY)
FROM CUSTOMER ;
Thanks very much in advance for your time,
Jinghao Liuajallen wrote:
Why not something more like
SELECT *
FROM fact1 l,
FULL OUTER JOIN fact1 d
ON l.company = d.company
AND l.transactiontypeid = 1
AND d.transactiontypeid = 2;
Because this is not an equivalent of the original query.
drop table t1 cascade constraints purge;
drop table t2 cascade constraints purge;
create table t1 as select rownum t1_id from dual connect by level <= 5;
create table t2 as select rownum+2 t2_id from dual connect by level <= 5;
select * from (select * from t1 where t1_id > 2) t1 full outer join t2 on (t1_id = t2_id);
select * from t1 full outer join t2 on (t1_id = t2_id and t1_id > 2);
T1_ID T2_ID
3 3
4 4
5 5
6
7
T1_ID T2_ID
1
2
3 3
4 4
5 5
6
7
Maybe you are looking for
-
Unable to install Adobe CS4 on Windows 7!
I just upgraded my laptop's OS from Vista 32-bit to Windows 7 32-bit. When I tried to install Adobe Design Premium CS4 Student Edition back on my laptop, it just doesn't seems to be installing anything. And after an hour or so, it just pop up a windo
-
I have an early apple tv. Will it support netflix streaming? Netflix does not show on the internet tab on the AppleTV display. Will my current appletv connect to icloud services, synch, etc.? Also, what is the size of the current appleTV's hard drive
-
Suggestions I am use too movie maker want to make talking pets for business
I am considering buying CS4 for promoting my small business. I want to make viral video's with talking pets and am overwhelmed with the tech talk about CS4. I was hoping I could get some advice as how to do this, so I can try it before I buy it as my
-
I just bought my 8 year old and ipad mini and have set up his new ipad under my Apple Id. When syncing some movies it appears that some of the shows I have downloaded also download to his ipad from the cloud. I don't really want homeland etc to be on
-
I just upgraded QuickTime to QuickTime Pro, but cannot get it to work. Any suggestions?