SQL Tuning for SAP

Basis Rule for Tuning (ST03N)

• Average CPU time should be < 50 % of the total response time, otherwise the server (ST06/OS07, OS07) or the running programs (SE30) should be analyzed more in detail

• Average wait time should be < 10 % of the total response time or < 50 ms, otherwise the server should be analyzed with transaction ST06 more in detail

• Average load time should be < 10 % of the total response time or < 50 ms, otherwise the R/3 buffers should be analyzed with transaction ST02 more in detail

• Average DB time should be < 40-50 % of the total response time, otherwise the database should be analyzed with transaction ST04, ST06 more in detail

• Average GUI time > 200ms may indicate poor GUI performance which could be caused by bad network connections or user menus downloading too much data

ST04

  • database buffer should be > 94 %, If the  database buffer  quality is > 94 % you must check the value for „Reads / User calls“.
  • Shared Pool
  • DD-cache quality is greater than 80%
  • SQL Area pinratio is 95 or higher
  • reloads/pin is 0.04 or lower
  • User/recursive calls are 2 higher
  • The ratio of "Busy wait time" to "CPU time"  should be 60:40
    • SELECT
        ROUND((STM1.VALUE - STM2.VALUE) / 1000000) "BUSY WAIT TIME (S)",
        ROUND(STM2.VALUE / 1000000) "CPU TIME (S)",
        ROUND((STM1.VALUE - STM2.VALUE) / STM1.VALUE * 100) || ‘ : ‘ ||
          ROUND(STM2.VALUE / STM1.VALUE * 100) RATIO
      FROM V$SYS_TIME_MODEL STM1, V$SYS_TIME_MODEL STM2
      WHERE STM1.STAT_NAME = ‘DB time‘ AND STM2.STAT_NAME = ‘DB CPU‘
  • Time Statistics Time/User call should be < 20
  • Sort too high means full table scan
  • table “V$SYSTEM_EVENT“.
  • db file sequential read<=20
  • Buffer busy waits>=40
  • Log file Sync<=20
  • • Write Complete Waits should be in top 10
  • • Free Buffer Wait should not be in top10
  • Overall Expensive SQL  report RSORADLD

Reference

Note 712624 - High CPU consumption by Oracle

Note 618868 - FAQ: Oracle performance

Note 766349 - FAQ: Oracle SQL optimization

Note 1020260 - Delivery of Oracle statistics

Note 122718 - CBO: Tables with special treatment

原文地址:https://www.cnblogs.com/tingxin/p/11982200.html

时间: 2024-10-09 17:36:52

SQL Tuning for SAP的相关文章

SQL Tuning Health-Check Script (SQLHC)

1. 纯手工打造 工具:程序员的双手 特点:手写客户端与服务器端验证代码 2. 半手工半自动 工具:jquery.validate(客户端) + DataAnnotations & DataAnnotationsExtensions(服务器端) 特点:客户端手写部分验证代码,服务器端只需声明验证规则 3. 全自动 工具:jquery.validate & jquery.validate.unobtrusive (客户端) + DataAnnotations & DataAnnota

怎样使用oracle 的DBMS_SQLTUNE package 来执行 Sql Tuning Advisor 进行sql 自己主动调优

 怎样使用oracle 的DBMS_SQLTUNE package 来执行 Sql Tuning Advisor 进行sql 自己主动调优 1>.这里简单举个样例来说明DBMS_SQLTUNE 的使用 首先现运行下某个想要调优的sql,然后获取sqlid SQL> select * from v$sqltext where sql_text like 'select * from dual%'; ADDRESS          HASH_VALUE SQL_ID        COMMA

11g新特性-自动sql调优(Automatic SQL Tuning)

11g新特性-自动sql调优(Automatic SQL Tuning) 在Oracle 10g中,引进了自动sql调优特性.此外,ADDM也会监控捕获高负载的sql语句. 在Oracle 11g中,通过运行sql tuning advisor加强了自动sql调优功能.默认情况下是每天夜间通过自动任务的方式运行"自动sql调优". 自动sql调优的过程: 1.识别需要调优的sql语句  根据AWR中的CPU和I/O负载来识别 2.调优,生成新的sql profile 在维护窗口(mai

【oracle】oracledba6 SQL Tuning sets

You want to use the SQL Tuning Advisor to generate recommendation s for badly written SQL statements in your development environment. W hich three sources can you select for the advisor to analyze? (Choose three.) A. Top SQL B. snapshots C. SQL Tunin

ORACLE SQL TUNING ADVISOR 使用方法

sql tunning advisor 使用的主要步骤: 1 建立tunning task 2 执行task 3 显示tunning 结果 4 根据建议来运行相应的调优方法  下面来按照这个顺序来实施一遍:    1  建立测试表以及索引 SQL> CREATE TABLE test_sql_advisor AS SELECT OWNER,OBJECT_NAME,OBJECT_ID FROM DBA_OBJECTS; Table created SQL> select count(*) fro

SQL Tuning 基础概述08 - SQL Tuning Advisor

SQL调优顾问 SQL Tuning Advisor的使用案例: 1.构建测试表T SQL> conn zjy/zjy Connected. SQL> create table t as select * from dba_objects; Table created. SQL> select count(*) from t; COUNT(*) ---------- 653500 2.对“select owner, object_id, object_name from t where

How to use STA(sql tuning advisor)

一.手工生成Sql tuning advisor 1.SQL text format: DECLARE my_task_name VARCHAR2(30); my_sqltext   CLOB; BEGIN my_sqltext := 'SELECT * FROM DBA_SEGMENTS WHERE OWNER=''CLIC'' AND SEGMENT_TYPE=''TABLE'''; my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_te

Oracle调整顾问(SQL Tuning Advisor 与 SQL Access Advisor

在Oracle数据库出现性能问题时,使用Oracle本身的工具包,给出合理的调优建议是比较省力的做法. tuning advisor 是对输入的sql set的执行计划进行优化accsee advisor 是对sql set当前如果引入索引.分区的话,性能有多大的提升,给出建议.sql tuning advisor是从一方面给出的建议,access advisor可以针对一个表或者多个表的所有操作给出分析建议,比如说对于select语句他会建议增加索引,而会降低DML的性能,sql access

Statistics gathering and SQL Tuning Advisor

1. https://www.pythian.com/blog/statistics-gathering-and-sql-tuning-advisor/ Our monitoring software found a long running job on one of our client's databases. The job was an Oracle's auto task running statistics gathering for more than 3 hours. I wa