Home > SAP software/management Tips > SAP Basis administration tips > Top 30 I/Os on your SAP System
SAP Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SAP BASIS ADMINISTRATION TIPS

Top 30 I/Os on your SAP System


Sujoy Mukherjee
09.16.2003
Rating: -3.83- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Sometimes it is worth identifying the top few SQL statements working on your SAP system. Fine-tuning these SQL statement have done wonders for the performance of our systems. Try executing the attached script on your development system with Oracle before taking it to your productive system.

Code

To be executed under SQLPLUS with user INTERNAL:
SQL Code :
==========
-- Top 30 I/o Intesive SQL Statements Identification : top30IO.sql
set linesize 80
set pagesize 58
set heading  on
set serveroutput on

spool top30iosql.txt

declare
        cursor curs1 is
              from v$sqlarea order by disk_reads / decode(executions,0,1,executions) desc;
        stmnt_ctr number(3);
        wrt1 number(3);

begin
        dbms_output.enable(50000);
              exit;
           end if;

:q!
ie0107:oraipd> cat top30iosql.sql
-- Top 30 I/o Intesive SQL Statements Identification : top30iosql.sql
set linesize 80
set pagesize 58
set heading  on
set serveroutput on

spool top30iosql.txt

declare
        cursor curs1 is
              select executions, disk_reads, buffer_gets, first_load_time, sql_text
              from v$sqlarea order by disk_reads / decode(executions,0,1,executions) desc;
        stmnt_ctr number(3);
        wrt1 number(3);

begin
        dbms_output.enable(50000);
        stmnt_ctr := 0;

        for inrec in curs1 loop
           stmnt_ctr := stmnt_ctr + 1;
           if stmnt_ctr >= 31 then
              exit;
           end if;

           dbms_output.put_line('--------------------------------------' ||
                                '--------------------------------------');
           dbms_output.put_line('SQL Stmnt Number: ' || to_char(stmnt_ctr));
           dbms_output.put_line('--------------------------------------' ||
                                '--------------------------------------');
           dbms_output.put_line('Executions     :  ' ||
                                to_char(inrec.executions));
           dbms_output.put_line('Disk Reads     :  ' || to_char(inrec.disk_reads) ||
                 '               Buffer Gets    :  ' || to_char(inrec.buffer_gets));
           dbms_output.put_line('First Load Time:  ' || inrec.first_load_time);
           dbms_output.put_line('SQL Statement-------->');
           wrt1 := 1;
           while wrt1 <= ceil(length(inrec.sql_text) / 72) loop
              dbms_output.put_line('.....' ||
                                        substr(inrec.sql_text,((wrt1-1)*72)+1,72));
              wrt1 := wrt1 + 1;
           end loop;
           dbms_output.put_line('--------------------------------------' ||
                                '--------------------------------------');
           dbms_output.put_line(' ');
        end loop;
end;
/
spool off
set serveroutput off
set termout on
Now edit/view the output file top30iosql.txt in suitable viewer of your O/S and do the fine tuning from there. Good luck!

Rate this Tip
To rate tips, you must be a member of SearchSAP.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
SAP Basis administration tips
Converting from MDMP to Unicode
Can SAP developer include authority check for S_TCODE in a called transaction?
How to fix Smart Forms printing double purchase orders
Deriving the name of a Smart Style from a Smart Form
SAP FI/CO consultant's role during upgrade from R/3 to ECC 6.0
Alternatives to downloading a trial version of SAP IDES ERP software
Verifying data consistency in production SAP FI/CO system when restoring a backup
How to upgrade DB2 on SAP R/3 4.7
How to create a snapshot from NAS and SAN of Oracle database
How to clone an SAP ECC 6.0 instance

SAP Basis administration and NetWeaver administration
Seven tips for simplifying SAP data archiving administration
Using up-to-date SAP ABAP codes in SAP ECC 6.0
Migrating SAP Solution Manager system between Unix platforms
SAP talent management FAQ: Fresh answers to frequently asked questions
Collaboration a must for SAP hardware teams and software teams
How to establish communication between SAP Unicode and non-Unicode systems
Mission-critical SAP software demands a mission-critical hardware infrastructure
In an upgrade to SAP ECC 6.0, when do integrated apps get upgraded?
NetWeaver PI 7.1 easier to implement than earlier versions, SAP says
SAP Software Deployment Manager vs. Java Support Package Manager
SAP Basis administration and NetWeaver administration Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Basis  (SearchSAP.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



NetWeaver SAP White Papers
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts