Tuning in ST02
Hi guyz,
In ST02, i just want to know, when to fine tune the Roll, Extended and Paging areas. I want to know the threshold levels of all these memory areas so that when the threshold is reached, i know that i have to fine tune. Also what is the limit for the number of swaps that can occur in a day??
Thanx in advance
Hi Ashok,
ST02 show memory and buffer utilization, each buffer is used for diffrent thing so there is no absolut aswer, the swapped column show the memory that is swapped out by the operation system. This depend's on OS as well.
I recomend that you use the F1 (hepl) button more often, its the only way to learn.
Here is some useful document.
http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a6e98505211d189550000e829fbbd/frameset.htm
Regards,
Hari.
PS: Award points if helpful.
Similar Messages
-
Buffer Tuning in ST02 Recommendations
I am looking for some advice as to how to change tune my buffers in our application servers. Their current settings are based off of SAPs, pre go-live checks. But to me they seem to need some adjusting.
Our server has 8GBs of RAM, so I feel like I definitely have some room to expand them.
What would you recommend I change the values to?
Here is a screenshot of the buffers - http://aycu07.webshots.com/image/20166/2003999813259508481_rs.jpg10k swaps per day is pretty high, especially for the PXA buffer. I'd definitely increase it if you have enough physical memory; the only impact is that it's going to allocated a larger chunk of shared memory, so if you don't have enough physical RAM to absorb the increase without swapping, you're not going to gain much. 500MB is pretty small for the program buffer these days, but that would depend on what modules you're running. I've hardly ever seen this below 1GB lately, and normally in the 1.5 - 2GB range for ERP systems with multiple modules implemented on a single app server.
The rule of thumb I've used is to try to keep at least 10% free (both space and # of entries). From your screen shot it looks like you need to increase the size of the field definition buffer, program buffer, CUA buffer, and export/import buffer.
Rich -
Swapping in ST02 in Initial Record Buffer rsdb/ntab/irbdsize
Hello All,
I've been trying to do some tuning in ST02 and was hoping someone might be able to explain why I am getting such a low hit rate on the Initial Records Buffer, and the high level of swapping, when there appears to be plenty free space and plenty free entries.
Here are the stats I see.
Efficiency
HITRATIO % 42
HITS 9,645
REQUESTS 22,790
DB access quality % 42
DB access 13,136
DB access saved 9,645
Reorgs 0
Size
Allocated KB 8,750
Available KB 7,500
Used KB 1,053
Free KB 6,447
Directory entries
Available 10,000
Used 3,801
Free 6,199
Swaps
Objects swapped 9,335
Frames swapped 0
Resets Total 0
Any clues would be much appreciated.
Thanks
SteveI have the same issue and my parameter settings are currently:
rsdb/ntab/irbdsize - 41500
rsdb/ntab/entrycount 45000
Are there any other suggestions? See below for swap information.
Efficiency HITRATIO % 43
HITS 10,243
REQUESTS 23,731
DB access quality % 43
DB access 13,488
DB access saved 10,243
Reorgs 0
Size Allocated KB 42,906
Available KB 41,500
Used KB 4,717
Free KB 36,783
Directory entries Available 11,250
Used 9,759
Free 1,491
Swaps Objects swapped 3,728
Frames swapped 0
Resets Total 0 -
ST02(performance tuning)
Hi friends,
For the performance tuning I have put Tcode ST02 where in the below was shown in Red, Pls guide me how to proceed further
swaps
file description 7945(Red)
Initial records 11996(Red)
program 37372(Red)
CUA 17156(Red)
screen 2273(Red)
Generic Key 59(Red)
single record 19(Red)
export/import 26539(Red)
Pls clearly guide me how to proceed further....
Thanks in Advance
YedhiriDear Venu,
<removed_by_moderator>
Read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
Do not ask for points - This forum should be firstly about information exchange; points are an incentive and a way of saying thanks.
Asking for points is like asking someone to say "thank you": The only time we do this in real life is when teaching a child good manners. Saying it to an adult is insulting, so why do it in the forums? If someone keeps asking questions without awarding points, simply stop answering them or use the abuse button to report it.
Regards,
Ashutosh
Edited by: Juan Reyes on Jul 17, 2008 12:13 PM -
Hi all,
In ST02 for Screen buffer and export/import Free directory entries and % are showing '0' , what does it mean ... Hit ratio for all buffers is 99.96 nearly for export/import it's showing 85% and swaps also rising .
Please suggest...
Thanks,
Subhash.GTune Buffers monitor shows the percentage usage of buffers and memory.
The Setups / Tune Buffers monitor displays data on:
- Buffer sizes
- Buffer qualities (hit ratios)
Bottlenecks may be indicated if buffer swaps occur
Choose Detail analysis menu to display other data, such as :
- Memory usage
- Semaphores usage
- Table calls
Max. use (in KB) should be less than In memory (in KB).
- The lower part of the Setups / Tune Buffers monitor displays data on:
- Extended memory size and usage
- Usage and configuration of the roll mechanism
Bottlenecks may be indicated if:
- For extended memory: Max use. = In memory
- For roll area: Max use. > In memory
good luck
if it useful reward points are appreciated -
Dear Experts,
I have installed sap ecc6 ehp4reday sp1 with db2 9.1 fp9 on hp-ux 11.31 1 x Itanium 1.46Ghz with RAM 16 GB.
the issue is there is too many REDs in st02 tune screen . Kindly suggest me any note matching with the given information or provide me solution .
the st02 summery is as bellow
Buffer Name Comment
Profile Parameter Value Unit Comment
Program buffer PXA
abap/buffersize 300000 kB Size of program buffer
abap/pxa shared Program buffer mode
CUA buffer CUA
rsdb/cua/buffersize 3000 kB Size of CUA buffer
Screen buffer PRES
zcsa/presentation_buffer_area 4400000 Byte Size of screen buffer
sap/bufdir_entries 2000 Max. number of buffered screens
Generic key table buffer TABL
zcsa/table_buffer_area 30000000 Byte Size of generic key table buffer
zcsa/db_max_buftab 5000 Max. number of buffered objects
Single record table buffer TABLP
rtbb/buffer_length 10000 kB Size of single record table buffer
rtbb/max_tables 500 Max. number of buffered tables
Export/import buffer EIBUF
rsdb/obj/buffersize 4096 kB Size of export/import buffer
rsdb/obj/max_objects 2000 Max. number of objects in the buffer
rsdb/obj/large_object_size 8192 Bytes Estimation for the size of the largest object
rsdb/obj/mutex_n 0 Number of mutexes in Export/Import buffer
OTR buffer OTR
rsdb/otr/buffersize_kb 4096 kB Size of OTR buffer
rsdb/otr/max_objects 2000 Max. number of objects in the buffer
rsdb/otr/mutex_n 0 Number of mutexes in OTR buffer
Exp/Imp SHM buffer ESM
rsdb/esm/buffersize_kb 4096 kB Size of exp/imp SHM buffer
rsdb/esm/max_objects 2000 Max. number of objects in the buffer
rsdb/esm/large_object_size 8192 Bytes Estimation for the size of the largest object
rsdb/esm/mutex_n 0 Number of mutexes in Exp/Imp SHM buffer
Table definition buffer TTAB
rsdb/ntab/entrycount 20000 Max. number of table definitions buffered
The size of the TTAB is nearly 100 bytes * rsdb/ntab/entrycount
Field description buffer FTAB
rsdb/ntab/ftabsize 30000 kB Size of field description buffer
rsdb/ntab/entrycount 20000 Max. number / 2 of table descriptions buf
FTAB needs about 700 bytes per used entry
Initial record buffer IRBD
rsdb/ntab/irbdsize 6000 kB Size of initial record buffer
rsdb/ntab/entrycount 20000 Max. number / 2 of initial records buffer
IRBD needs about 300 bytes per used entry
Short nametab (NTAB) SNTAB
rsdb/ntab/sntabsize 3000 kB Size of short nametab
rsdb/ntab/entrycount 20000 Max. number / 2 of entries buffered
Calendar buffer CALE
zcsa/calendar_area 500000 Byte Size of calendar buffer
zcsa/calendar_ids 200 Max. number of directory entries
Roll, extended and heap memory EXTM
ztta/roll_area 3000000 Byte Roll area per workprocess (total)
ztta/roll_first 1 Byte First amount of roll area used in a dialog WP
ztta/short_area 3200000 Byte Short area per workprocess
rdisp/ROLL_SHM 16384 8 kB Part of roll file in shared memory
rdisp/PG_SHM 8192 8 kB Part of paging file in shared memory
rdisp/PG_LOCAL 150 8 kB Paging buffer per workprocess
em/initial_size_MB 4092 MB Initial size of extended memory
em/blocksize_KB 4096 kB Size of one extended memory block
em/address_space_MB 4092 MB Address space reserved for ext. mem. (NT only
ztta/roll_extension 2000000000 Byte Max. extended mem. per session (external mode
abap/heap_area_dia 2000000000 Byte Max. heap memory for dialog workprocesses
abap/heap_area_nondia 2000000000 Byte Max. heap memory for non-dialog workprocesses
abap/heap_area_total 2000000000 Byte Max. usable heap memory
abap/heaplimit 40000000 Byte Workprocess restart limit of heap memory
abap/use_paging 0 Paging for flat tables used (1) or not (0)
Statistic parameters
rsdb/staton 1 Statistic turned on (1) or off (0)
rsdb/stattime 0 Times for statistic turned on (1) or off (0)
thanks
sadiqHello Sadiq,
I agree with the previous post, I'm afraid there is no quick fix for this, especially since we cannot see all of these red entries.
If your errors are purely in memory management on SAP side, you should consider posting in the CST "memory management" part of this forum
Advise from a DB2 perspective is to make sure that all memory specific setting are correct as per note:
899322 DB6: DB2 9.1 Standard Parameter Settings
After setting these parmeters and carrying out further fine tuning yourself, you should consider scheduling an early watch session from SAP.
Best of luck,
Paul
Edited by: Paul Murtagh on Apr 14, 2011 4:50 PM -
hi Gurus,
Sorry to disturb u, have a big trouble with performance tuning.
I m working on performance tuning part for a project and i have got the w
they jus give me the whole report about the performance releated isses at all levels so everthing is there(repert is Based on Production ) but now after going through this report wot to do and where to start cos i only got access to Test client and no access to development cleint first things and than the major problem they are facing is that when they run report in a Test cleint performance is ok but when they run reports in a Production then system performance is really poor, so they want to know the reason for that as well.
as far as i understand is that for performance in prod system i should have acces to the system first and thean check the database there,so the thing is that can u plz tell me that how to check the database and how to run whole system report on that system as well which gives me complete report for the whole system performance including OS level, DB level,And than SAP systme level,they have some of this kind of tool here to use that but dont kknow which 1 is that and how to use that.
waiting for reply.
thanks In advance.
regards
AmitHi Dash,
thanks for quick reply.
when i go and check the report in ST02 so there Hit Ratio is 99.94%, but query running time is significantly or i should say more than 3 times in Production system, so dont know where the problem is.
Cos i m getting slow performance in a Prod system so dont know that how to start analysis on that systme cos i dont have acess to Prod system, so plz and other
commment on this ll be appriciated.
thanks
regards
Amit -
Performance Tuning Best Practices/Recommendations
We recently went like on a ECC6.0 system. We have 3 application servers that are showing a lot of swaps in ST02.
Our buffers were initially set based off of SAP Go-Live Analysis checks. But it is becoming apparent that we will need to enlarge some of our buffers.
Are there any tips and tricks I should be aware of when tuning the buffers?
Does making them too big decrease performance?
I am just wanting to adjust the system to allow the best performance possible, so any recommendations or best practices would be appreciated.
Thanks.Hi,
Please increase the value of parameters in small increments. If you set the parameters too large, memory is wasted. This can result in paging if too much memory is taken from the operating system and allocated to SAP buffers.
For example, if abap/buffersize is 500000, change this to 600000 or 650000. Then analyze the performance and adjust parameters accordingly.
Please check out <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a6f4e505211d189550000e829fbbd/content.htm">this link</a> and all embedded links. The documentation provided there is fairly elaborate. Moreover, the thread mentioned by Prince Jose is very good for a guideline as well.
Best regards -
Roll area on disk is 0 in ST02
Hi experts.
I cannot find an answer for this question. After tuning our parameters for roll area the transaction ST02 shows 0 KB for "roll area on disk".
SAP Memory % Curr.Use Cur.use[KB Max.use[KB In mem[KB] On disk[KB SAPCurCach Hitratio %
Roll area 0,78 2.047 104.584 262.144 0 IDs 99,77
Why? Is that normal? Because there was nothing used?
Here are my parameters:
Roll, extended and heap memory EXTM
ztta/roll_area 50000000 Byte Roll area per workprocess (total)
ztta/roll_first 1 Byte First amount of roll area used in a dialog WP
ztta/short_area 1600000 Byte Short area per workprocess
rdisp/ROLL_MAXFS 32768 8 kB Maximum roll file size
rdisp/ROLL_SHM 32768 8 kB Part of roll file in shared memory
rdisp/PG_SHM 8192 8 kB Part of paging file in shared memory
rdisp/PG_LOCAL 150 8 kB Paging buffer per workprocess
em/initial_size_MB 10000 MB Initial size of extended memory
em/blocksize_KB 4096 kB Size of one extended memory block
em/address_space_MB 4092 MB Address space reserved for ext. mem. (NT only
em/global_area_MB 96 MB Extended global memory
ztta/roll_extension 1000000000 Byte Max. extended mem. per session (external mode
abap/heap_area_dia 2000000000 Byte Max. heap memory for dialog workprocesses
abap/heap_area_nondia 2000000000 Byte Max. heap memory for non-dialog workprocesses
abap/heap_area_total 1500000000 Byte Max. usable heap memory
abap/heaplimit 40000000 Byte Workprocess restart limit of heap memory
abap/use_paging 0 Paging for flat tables used (1) or not (0)
abap/shared_objects_size_MB 20 MB Shared objects
We are using Solaris 10:
Monitoring Category
Description
Value
Unit
Info
Operating system
SunOS sapbwp 5.10 Generic_147440-25
Info
Timestamp
13.03.2015 10:36:40
Info
Hostname
sapbwp
Virtualization Configuration
Host System Information
Solaris
Virtualization Configuration
Solution
Solaris Container
Virtualization Configuration
Solution Version
Solaris Zone
Virtualization Configuration
Type
CPU
Average processes waiting ( 5 min)
9,00
CPU
Number of CPUs
256
CPU
I/O Wait
0
CPU
System Utilization
0
CPU
User Utilization
0
CPU
Idle
0
Memory
Physical memory
52.428.800
KB
Memory
Configured swap size
78.643.200
KB
Memory
Free swap size
21.934.728
KB
Memory
Maximum swap size
78.643.200
KB
Memory
Actual swap size
78.643.200
KB
Memory
Free
247
Memory
Page In
0
KB/s
Memory
Page Out
0
KB/s
Memory
Page In of RAM
0
%/h
Memory
Page Out of RAM
0
%/h
Thanks in advance.Hello,
That does not sound abnormal, if there is enough space in the part of roll that is in memory no overflow to disk is required.
What is your system version, Roll memory has gone in 740 version...
2085980 - New features in memory management as of Kernel Release 7.40
Furthermore the Roll Memory became obsolete since SAP_KERNEL 740.
Best regards -
What measures shall we take if it is needed to performance tune the SAP Server. It is getting too slow. It will be helpful if someone can send me some link about SAP Performance tuning, not ABAP performance tuning.
Regards,
SubhasishThe SAP Servers can be slow because of many reasons:
1. The Table Consistency: The tables should be consistent. A consistency check should be done regulalrly.Better would be using DB13 so that it can be scheduled in appropriate days.
2. One major reason that I have found in recent times is the amount of authorizations that might be available to the users of the sytem. If all the users have a high volume of authorization objects in their user master buffer, then the response time becomes sluggish.This is true for most of the dev boxes that allow almost any amount of authorization for users and have a low RAM size.
3. Also you might be intrested to check your network consistency. If you are accessing your servers from home with a wireless connection of 16kbps, you might want to configure your logon pad for such a crappy connection.
Most of the BASIS performance tuning tasks such as ST04, STAT, ST02 and DB12 should be carried out too just to investigate furthur.
Hope these were a few helpful tips.
Peace be with everybody
-Saurav -
Hi Friends,
In our development system Swaps no is very high and it shows RED mark in st02
Table definition =25.213
Field definition = 357.579
Initial records = 62.209
program = 81.856
CUA = 12.158
Screen = 879
please check below attached screen shot for more details
Could you please any one help me how to resolve this issue..
Thanks in Advance
Regards,
VenkatHi Lisa,
SWAPs themselves are not an indicator of a performance issue.It's unlikely you can avoid them from happening in production systems. What matters is a quality of buffer tuning and a number of swaps hapenning every day. Let's say you are getting more then 10000 swaps each day for the program buffer. Then you'd need to pay attenation to this buffer and try to find out a way to reduce swaps.
Here is the link to SAP help:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/c4/3a6ecc505211d189550000e829fbbd/content.htm
Regards,
Mike
Message was edited by: Mike Puzankov -
Hi Guys,
I would appreciate your assistance/recommendations with Buffer Tuning
Im experiencing high swapping on Several Buffer as shown Below
Which considerations would you take for adjusting these buffers to optimal Values?
Do you estimate the parameters values by incrementing by 10-20% ? Or is there a better way to determine the best values.
Thanks a lot for your help.
Nametab -->Table Definition
Efficiency HITRATIO % 97
HITS 119.405.209
REQUESTS 123.408.979
DB access quality % 97
DB access 4.006.836
DB access saved 119.399.849
Reorgs 0
Size Allocated KB 9.800
Available KB 8.219
Used KB 8.219
Free KB 0
Free KB 0
Directory entries Available 28.826
Used 28.826
Free 0
Swaps Objects swapped 1.032.168
Frames swapped 0
Resets Total 0
Table definition buffer TTAB
rsdb/ntab/entrycount 28826 Max. number of table definitions buffered
Nametab-->Field Definition
Efficiency HITRATIO % 100
HITS 80.761.920
REQUESTS 81.137.309
DB access quality % 100
DB access 363.063
DB access saved 80.761.378
Reorgs 0
Size Allocated KB 45.515
Available KB 43.263
Used KB 40.109
Free KB 3.154
Directory entries Available 28.826
Used 7.176
Free 21.650
Swaps Objects swapped 355.332
Frames swapped 0
Resets Total 0
rsdb/ntab/ftabsize 43263 kB Size of field description buffer
Program
Efficiency HITRATIO % 100
HITS 385.544.192
REQUESTS 385.922.653
DB access quality % 100
DB access 653.940
DB access saved 565.109.488
Reorgs 0
Size Allocated KB 400.000
Available KB 370.780
Used KB 369.428
Free KB 1.352
Gaps KB 1.303
Directory entries Available 100.000
Used 10.385
Free 89.615
Swaps Objects swapped 206.098
Frames swapped 0
Resets Total 0
Program buffer PXA
abap/buffersize 400000 kB Size of program buffer
abap/pxa shared Program buffer mode
Export/Import
Efficiency HITRATIO % 81
HITS 13.737.920
REQUESTS 16.906.841
DB access quality % 100
DB access 0
DB access saved 0
Reorgs 0
Size Allocated KB 4.096
Available KB 3.375
Used KB 2.757
Free KB 253
Directory entries Available 2.000
Used 1.031
Free 969
Swaps Objects swapped 32.476
Frames swapped 428.617*
Resets Total 0
Export/import buffer EIBUF
rsdb/obj/buffersize 4096 kB Size of export/import buffer
rsdb/obj/max_objects 2000 Max. number of objects in the buffer
rsdb/obj/large_object_size 8192 Bytes Estimation for the size of the largest object
rsdb/obj/mutex_n 0 Number of mutexes in Export/Import bufferHi Martin,
Since 20GB set to MSSQL DB, you can reserve 3GB for system application, process, backup, external process and etc.
Therefore, you can allocate 27GB to SAP system.
You can allocate 22GB to PHYS_MEMSIZE, abap/buffersize to 1000000 and 30% to SAP buffer in ST02 where you noticed alot of SWAP. Also, you can allocate additional space to rdisp/ROLL_SHM and rdisp/PG_SHM if the percentage of "In Memory used" is around or more than 80%.
You can check based on the history usage in ST02.
However, try not the exceed the shared memory of 27GB for total memory assigned for SAP system, you can check at ST02 -> detailed analysis -> storage.
Cheers,
Nicholas Chang -
Hi,
Iam new to db tuning . My system shows more SWAPS when i go to ST02 .
System slow down performanance.SWAPs are showing more.
Any idea how to resolve this.
Thanks
LisaHi Lisa,
Lars is very correct.There may be some reasons as
told by Lars.In order to solve this problem u can follow
these steps.
1)Send a session data to SAP by executing tr code "SDCCN"
or "SDCC".On the basis of this session data SAP will
send u a Analyzed Early watch report.
In which u can check whether some programs are
being swapped frequently.
Another reaSON may be low buffer space.
For this u can increase the size of buffer.
You can check programs responce time by urself by using
Tr code ST03.
Hope this will help you.
Regards
Aditya Kumar -
hello all
my one of query is returning result in 1-2 mins only for 1 lakh record but i am not sure if it showed me complete rows or not because when I an trying to get count of result ..its taking lot of time .when I am using this query on plsql code ..code is running slow so just wanted to confirm on query tuning point of view if its fine or not ..please look onto it and let me know if query is fine or not by explain plan .my oracle version is 11g
this is my query
SELECT ROWNUM , TRUNC(rownum/5000) + 20000 ,'FOR_UPDATE', sku_org.NAME ,
acct_promo_sku.src_num , acct_promo_sku.sub_type ,
promo_actual.sku_actual_pos
FROM siebel.s_src acct_promo_hdr,
siebel.s_src acct_title_format,
siebel.s_src acct_promo_sku,
siebel.s_src_x acct_promo_hdrx,
siebel.s_src_x acct_promo_skux,
siebel.s_prod_int prod,
siebel.s_bu promo_hdr_org,
siebel.s_bu sku_org,
siebelwb.stg_sbl_acct_promo_actuals2 promo_actual
WHERE acct_promo_hdr.sub_type = 'PLAN_ACCOUNT_PROMOTION'
AND acct_promo_hdr.row_id = acct_title_format.par_src_id
AND acct_title_format.sub_type = 'PLAN_ACCT_PROMOTION_CATEGORY'
AND acct_title_format.row_id = acct_promo_sku.par_src_id
AND acct_promo_sku.sub_type = 'PLAN_ACCOUNT_PROMOTION_PRODUCT'
AND acct_promo_hdr.row_id = acct_promo_hdrx.par_row_id
AND acct_promo_sku.row_id = acct_promo_skux.par_row_id(+)
AND acct_promo_sku.prod_id = prod.row_id
AND acct_promo_hdr.bu_id = promo_hdr_org.row_id
AND acct_promo_sku.bu_id = sku_org.row_id
AND prod.x_prod_material_num = promo_actual.material_number
and prod.X_PROD_SALES_ORG=promo_actual.sales_org
AND acct_promo_hdr.row_id = promo_actual.acct_promo_id
and nvl(acct_promo_hdr.pr_accnt_id,0)=nvl(promo_actual.acct_siebel_rowid,0)
and nvl(acct_promo_hdr.x_indirect_id,0)=nvl(promo_actual.indirect_acct_siebel_rowid,0)
AND promo_actual.load_date >= TRUNC(SYSDATE)
AND promo_actual.load_date < TRUNC(SYSDATE + 1)
explain plan
PLAN_TABLE_OUTPUT
Plan hash value: 3864590768
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 298 | 2300 (1)| 00:00:28 |
| 1 | COUNT | | | | | |
|* 2 | FILTER | | | | | |
| 3 | NESTED LOOPS | | | | | |
| 4 | NESTED LOOPS | | 1 | 298 | 2300 (1)| 00:00:28 |
| 5 | NESTED LOOPS OUTER | | 1 | 273 | 2298 (1)| 00:00:28 |
| 6 | NESTED LOOPS | | 1 | 263 | 2296 (1)| 00:00:28 |
| 7 | NESTED LOOPS | | 1 | 236 | 2295 (1)| 00:00:28 |
| 8 | NESTED LOOPS | | 1 | 165 | 2292 (1)| 00:00:28 |
| 9 | NESTED LOOPS | | 1 | 117 | 2289 (1)| 00:00:28 |
| 10 | NESTED LOOPS | | 1 | 109 | 2289 (1)| 00:00:28 |
| 11 | NESTED LOOPS | | 1 | 99 | 2287 (1)| 00:00:28 |
|* 12 | TABLE ACCESS FULL | STG_SBL_ACCT_PROMO_ACTUALS2 | 1 | 49 | 2285 (1)| 00:0
|* 13 | TABLE ACCESS BY INDEX ROWID| S_SRC | 1 | 50 | 2 (0)| 00:00:01 |
|* 14 | INDEX UNIQUE SCAN | S_SRC_P1 | 1 | | 1 (0)| 00:00:01 |
|* 15 | INDEX RANGE SCAN | S_SRC_X_U1 | 1 | 10 | 2 (0)| 00:00:01 |
|* 16 | INDEX UNIQUE SCAN | S_BU_P1 | 1 | 8 | 0 (0)| 00:00:01 |
|* 17 | TABLE ACCESS BY INDEX ROWID | S_SRC | 1 | 48 | 3 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | S_SRC_F2 | 2 | | 2 (0)| 00:00:01 |
|* 19 | TABLE ACCESS BY INDEX ROWID | S_SRC | 1 | 71 | 3 (0)| 00:00:01 |
|* 20 | INDEX RANGE SCAN | S_SRC_F2 | 2 | | 2 (0)| 00:00:01 |
| 21 | TABLE ACCESS BY INDEX ROWID | S_BU | 1 | 27 | 1 (0)| 00:00:01 |
|* 22 | INDEX UNIQUE SCAN | S_BU_P1 | 1 | | 0 (0)| 00:00:01 |
|* 23 | INDEX RANGE SCAN | S_SRC_X_U1 | 1 | 10 | 2 (0)| 00:00:01 |
|* 24 | INDEX UNIQUE SCAN | S_PROD_INT_P1 | 1 | | 1 (0)| 00:00:01 |
|* 25 | TABLE ACCESS BY INDEX ROWID | S_PROD_INT | 1 | 25 | 2 (0)| 00:00:
Predicate Information (identified by operation id):
2 - filter(TRUNC(SYSDATE@!)<TRUNC(SYSDATE@!+1))
12 - filter("PROMO_ACTUAL"."LOAD_DATE">=TRUNC(SYSDATE@!) AND "PROMO_ACTUAL"."LOAD_DATE"<TRUNC(SYSD
13 - filter("ACCT_PROMO_HDR"."SUB_TYPE"='PLAN_ACCOUNT_PROMOTION' AND
NVL("ACCT_PROMO_HDR"."PR_ACCNT_ID",'0')=NVL("PROMO_ACTUAL"."ACCT_SIEBEL_ROWID",'0') AND
NVL("ACCT_PROMO_HDR"."X_INDIRECT_ID",'0')=NVL("PROMO_ACTUAL"."INDIRECT_ACCT_SIEBEL_ROWID",'0'
14 - access("ACCT_PROMO_HDR"."ROW_ID"="PROMO_ACTUAL"."ACCT_PROMO_ID")
15 - access("ACCT_PROMO_HDR"."ROW_ID"="ACCT_PROMO_HDRX"."PAR_ROW_ID")
16 - access("ACCT_PROMO_HDR"."BU_ID"="PROMO_HDR_ORG"."ROW_ID")
17 - filter("ACCT_TITLE_FORMAT"."SUB_TYPE"='PLAN_ACCT_PROMOTION_CATEGORY')
18 - access("ACCT_PROMO_HDR"."ROW_ID"="ACCT_TITLE_FORMAT"."PAR_SRC_ID")
19 - filter("ACCT_PROMO_SKU"."PROD_ID" IS NOT NULL AND
"ACCT_PROMO_SKU"."SUB_TYPE"='PLAN_ACCOUNT_PROMOTION_PRODUCT')
20 - access("ACCT_TITLE_FORMAT"."ROW_ID"="ACCT_PROMO_SKU"."PAR_SRC_ID")
22 - access("ACCT_PROMO_SKU"."BU_ID"="SKU_ORG"."ROW_ID")
23 - access("ACCT_PROMO_SKU"."ROW_ID"="ACCT_PROMO_SKUX"."PAR_ROW_ID"(+))
24 - access("ACCT_PROMO_SKU"."PROD_ID"="PROD"."ROW_ID")
25 - filter("PROD"."X_PROD_MATERIAL_NUM" IS NOT NULL AND
"PROD"."X_PROD_MATERIAL_NUM"="PROMO_ACTUAL"."MATERIAL_NUMBER" AND
"PROD"."X_PROD_SALES_ORG"="PROMO_ACTUAL"."SALES_ORG")
55 rows selected.
thanksHi,
the plan you posted has the cost of 2300, i.e. 2300 single-block reads or equivalent number f multi-block reads. Even if none of the blocks is found in cache, 2300 reas shouldn't take more than a couple of minutes, beacause for most of the hard drives available today a disk read is typically within 5-10 ms.
This means that if there is a problem, we will never find out about it by looking in the plan. And it's quite likely that there is, in fact, a problem, because the plan contains a bunch of nested joins, and the cost of each nested join is directly proportional to the cardinality of the previous nested loop. I.e. it suffices to make one bad mistake in estimating the number of rows coming fom one of the nested rows to screw up the entire plan and get all remaining estimates (including the total cost of the query) completely wrong.
In order for us to be able to tell more, we need to see the plan with rowsource statistics, and please don't forget to use tags to preserve formatting (use the preview tab to make sure the posted plan is actually readable).
Best regards,
Nikolay -
HOW TO: Post a SQL statement tuning request - template posting
This post is not a question, but similar to Rob van Wijk's "When your query takes too long ..." post should help to improve the quality of the requests for SQL statement tuning here on OTN.
On the OTN forum very often tuning requests about single SQL statements are posted, but the information provided is rather limited, and therefore it's not that simple to provide a meaningful advice. Instead of writing the same requests for additional information over and over again I thought I put together a post that describes how a "useful" post for such a request should look like and what information it should cover.
I've also prepared very detailed step-by-step instructions how to obtain that information on my blog, which can be used to easily gather the required information. It also covers again the details how to post the information properly here, in particular how to use the \ tag to preserve formatting and get a fixed font output:
http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
So again: This post here describes how a "useful" post should look like and what information it ideally covers. The blog post explains in detail how to obtain that information.
In the future, rather than requesting the same additional information and explaining how to obtain it, I'll simply refer to this HOW TO post and the corresponding blog post which describes in detail how to get that information.
*Very important:*
Use the \ tag to enclose any output that should have its formatting preserved as shown below.
So if you want to use fixed font formatting that preserves the spaces etc., do the following:
\ This preserves formatting
\And it will look like this:
This preserves formatting
. . .Your post should cover the following information:
1. The SQL and a short description of its purpose
2. The version of your database with 4-digits (e.g. 10.2.0.4)
3. Optimizer related parameters
4. The TIMING and AUTOTRACE output
5. The EXPLAIN PLAN output
6. The TKPROF output snippet that corresponds to your statement
7. If you're on 10g or later, the DBMS_XPLAN.DISPLAY_CURSOR output
The above mentioned blog post describes in detail how to obtain that information.
Your post should have a meaningful subject, e.g. "SQL statement tuning request", and the message body should look similar to the following:
*-- Start of template body --*
The following SQL statement has been identified to perform poorly. It currently takes up to 10 seconds to execute, but it's supposed to take a second at most.
This is the statement:
select
from
t_demo
where
type = 'VIEW'
order by
id;It should return data from a table in a specific order.
The version of the database is 11.1.0.7.
These are the parameters relevant to the optimizer:
SQL>
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.1.0.7
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL>
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 8
SQL>
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL>
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL>
SQL> column sname format a20
SQL> column pname format a20
SQL> column pval2 format a20
SQL>
SQL> select
2 sname
3 , pname
4 , pval1
5 , pval2
6 from
7 sys.aux_stats$;
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 01-30-2009 16:25
SYSSTATS_INFO DSTOP 01-30-2009 16:25
SYSSTATS_INFO FLAGS 0
SYSSTATS_MAIN CPUSPEEDNW 494,397
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
13 rows selected.Here is the output of EXPLAIN PLAN:
SQL> explain plan for
2 -- put your statement here
3 select
4 *
5 from
6 t_demo
7 where
8 type = 'VIEW'
9 order by
10 id;
Explained.
Elapsed: 00:00:00.01
SQL>
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1390505571
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 60 | 0 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 60 | 0 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
14 rows selected.Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
SQL> rem Set the ARRAYSIZE according to your application
SQL> set autotrace traceonly arraysize 100
SQL> select
2 *
3 from
4 t_demo
5 where
6 type = 'VIEW'
7 order by
8 id;
149938 rows selected.
Elapsed: 00:00:02.21
Execution Plan
Plan hash value: 1390505571
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 60 | 0 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 60 | 0 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
Statistics
0 recursive calls
0 db block gets
149101 consistent gets
800 physical reads
196 redo size
1077830 bytes sent via SQL*Net to client
16905 bytes received via SQL*Net from client
1501 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
149938 rows processed
SQL>
SQL> disconnect
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsThe TKPROF output for this statement looks like the following:
TKPROF: Release 11.1.0.7.0 - Production on Mo Feb 23 10:23:08 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: orcl11_ora_3376_mytrace1.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
select
from
t_demo
where
type = 'VIEW'
order by
id
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1501 0.53 1.36 800 149101 0 149938
total 1503 0.53 1.36 800 149101 0 149938
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 88
Rows Row Source Operation
149938 TABLE ACCESS BY INDEX ROWID T_DEMO (cr=149101 pr=800 pw=0 time=60042 us cost=0 size=60 card=1)
149938 INDEX RANGE SCAN IDX_DEMO (cr=1881 pr=1 pw=0 time=0 us cost=0 size=0 card=1)(object id 74895)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1501 0.00 0.00
db file sequential read 800 0.05 0.80
SQL*Net message from client 1501 0.00 0.69
********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
SQL> -- put your statement here
SQL> -- use the GATHER_PLAN_STATISTICS hint
SQL> -- if you're not using STATISTICS_LEVEL = ALL
SQL> select /*+ gather_plan_statistics */
2 *
3 from
4 t_demo
5 where
6 type = 'VIEW'
7 order by
8 id;
149938 rows selected.
Elapsed: 00:00:02.21
SQL>
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID d4k5acu783vu8, child number 0
select /*+ gather_plan_statistics */ * from t_demo
where type = 'VIEW' order by id
Plan hash value: 1390505571
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads |
| 0 | SELECT STATEMENT | | 1 | | 149K|00:00:00.02 | 149K| 1183 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 1 | 149K|00:00:00.02 | 149K| 1183 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | 1 | 149K|00:00:00.02 | 1880 | 383 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
20 rows selected.I'm looking forward for suggestions how to improve the performance of this statement.
*-- End of template body --*
I'm sure that if you follow these instructions and obtain the information described, post them using a proper formatting (don't forget about the \ tag) you'll receive meaningful advice very soon.
So, just to make sure you didn't miss this point:Use proper formatting!
If you think I missed something important in this sample post let me know so that I can improve it.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/Alex Nuijten wrote:
...you missed the proper formatting of the Autotrace section ;-)Alex,
can't reproduce, does it still look unformatted? Or are you simply kidding? :-)
Randolf
PS: Just noticed that it actually sometimes doesn't show the proper formatting although the code tags are there. Changing to the \ tag helped in this case, but it seems to be odd.
Edited by: Randolf Geist on Feb 23, 2009 11:28 AM
Odd behaviour of forum software
Maybe you are looking for
-
Unable to edit First no in Numbering series
Hello Experts One of my client has entered data in Purchase Order for first time . First PO in the database . But unfortunately numbering series wasn't set , and by default general document numbering had 25 as its next no for PO. And user added the d
-
Administrators security group is empty when using WLST in weblogic 10.3.1
When viewing the members of the "Administrators" group in WLST in weblogic 10.3.1, the list comes back empty. This is not good! "weblogic" is supposed to be a part of this group. In the admin console "weblogic" is listed as part of this group. Here i
-
IconItemRenderer with alternating icon existence
Hello, I have an IconItemRenderer in which some rows have icons (and decorators) and some do not. The ones that do not, align the labelDisplay as if they would and I wanted it to be left aligned. Is there something I'm missing, shouldn't a null icon
-
HT1414 i deleted my messages by mistake.. how can i get some back?
I deleted my messeges by mistake. Can I get them back?
-
Hi all, I've seen an issue with the timer policy between EEM versions. The absolute timer "time" field is supposed to be the number of seconds since January 1 1970. This is the behaviour i am seeing on EEM 4.0. I have 2 older devices, a 3600 and a 17