P. 1
RED_PAPER_-_ORACLE_10G_DRAFT_9[1]

RED_PAPER_-_ORACLE_10G_DRAFT_9[1]

|Views: 468|Likes:
Published by Mohammed Zubair

More info:

Published by: Mohammed Zubair on Mar 15, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

07/27/2011

pdf

text

original

Sections

  • Chapter 1 - Introduction
  • Chapter 2 - Generating Statistics
  • MANUALLY GATHERING TABLE STATISTICS
  • Sample DBMS_STATS Command:
  • GENERATING STATISTICS FOR DATA DICTIONARY TABLES
  • Generating System Statistics
  • STATISTICS AT RUNTIME FOR TEMPORARY TABLES
  • Example
  • Turning off %UpdateStats
  • Modify %UpdateStats to use Analyze command:
  • Tuning off Dynamic Sampling:
  • HISTOGRAMS
  • What are Histograms?
  • Candidate Columns for Histograms Within PeopleSoft Applications
  • Creating Histograms
  • Viewing Histograms
  • Chapter 3 - Dedicated Temporary Tables
  • WHAT ARE DEDICATED TEMP TABLES?
  • Performance Tips for Dedicated Temp Tables
  • APPLICATION ENGINE PERFORMANCE WITH DEDICATED TEMPORARY TABLES
  • How do temp tables work in Application Engine?
  • Test case explaining temp table behavior
  • CREATING PEOPLESOFT TEMPORARY TABLES AS ORACLE GLOBAL TEMP TABLES (GTT)
  • What are Global Temporary Tables?
  • Can GTTs be used in place of Dedicated Temp Tables?
  • Chapter 4 - Tablespace Selection
  • LOCALLY MANAGED TABLESPACES
  • Advantages of Locally Managed
  • Space Management
  • Locally Managed - AUTO ALLOCATE
  • Locally Managed - UNIFORM EXTENT
  • TEMPORARY TABLESPACES
  • Tempfile based
  • UNDO MANAGEMENT
  • Automatic Undo Management
  • Chapter 5 - Maintaining Indexes
  • INDEX TIPS
  • REBUILDING OF INDEXES
  • FUNCTION BASED INDEXES
  • Chapter 6 - Cursor Sharing
  • USE OF BIND VARIABLES
  • Application Engine - Reuse Flag
  • SQR/COBOL - CURSOR_SHARING
  • Pros and Cons of CURSOR_SHARING
  • Chapter 7 - Batch Server Selection
  • SCENARIO 1: PROCESS SCHEDULER AND DATABASE SERVER ON DIFFERENT BOXES
  • SCENARIO 2: PROCESS SCHEDULER AND DATABASE SERVER ON ONE BOX
  • Chapter 8 - Capturing Traces
  • Configuration Settings for Tracing an Online Process
  • APPLICATION ENGINE PERFORMANCE ISSUES
  • Configuration Settings for Tracing an AE Process on the Application Engine
  • Configuration Settings for Tracing an AE Process on the Database
  • ORACLE PERFORMANCE ISSUES
  • Generating a HTML or Text AWR Report:
  • To generate an HTML or text AWR report:
  • AWR report analysis:
  • Appendix A – Sample script to gather statistics on tables
  • Appendix B – Validation and Feedback
  • Appendix C - References
  • Appendix D – Revision History
  • Authors
  • Reviewers
  • Revision History

PeopleSoft Enterprise Performance on Oracle 10g Database

7/27/2011

PeopleSoft Red Paper

PEOPLESOFT 8 BATCH PERFORMANCE ON ORACLE 9I DATABASE 7/27/2011
Reference Number: Product(s): Release(s): Revision Number:

PeopleSoft 8 Batch Performance on Oracle 9i Database

All Enterprise products PeopleSoft 8.x, 9.x

Contains:
√ PeopleSoft Performance Tips √ Database Tuning Tips √ SQL Query Tuning Tips √ Use of Database Features √ Capturing Traces

© Copyright © 2006 Oracle, Inc. All rights reserved.

i

7/27/2011

PeopleSoft Red Paper

Table of Contents
Table of Contents ....................................................................................................................................................ii Chapter 1 - Introduction...........................................................................................................................................1 Structure of this Red Paper Related Materials 1 1

Chapter 2 - Generating Statistics...........................................................................................................................2 Manually Gathering Table Statistics 2 Sample DBMS_STATS Command:............................................................................................................................................3 Generating Statistics for Data dictionary tables 3 Generating System Statistics ......................................................................................................................................................4 Statistics at Runtime for Temporary Tables 4 Example.......................................................................................................................................................................................4 Turning off %UpdateStats...........................................................................................................................................................5 Modify %UpdateStats to use Analyze command:......................................................................................................................5 Tuning off Dynamic Sampling:...................................................................................................................................................9 Histograms 9 What are Histograms? .................................................................................................................................................................9 Candidate Columns for Histograms Within PeopleSoft Applications.....................................................................................10 Creating Histograms..................................................................................................................................................................10 Viewing Histograms..................................................................................................................................................................10 Chapter 3 - Dedicated Temporary Tables.............................................................................................................11 What are Dedicated Temp Tables? 11 Performance Tips for Dedicated Temp Tables.........................................................................................................................11 Application Engine Performance with Dedicated Temporary Tables 11 How do temp tables work in Application Engine?...................................................................................................................12 Test case explaining temp table behavior.................................................................................................................................12 Creating PeopleSoft Temporary Tables as Oracle Global Temp Tables (GTT) 14 What are Global Temporary Tables?........................................................................................................................................14 Can GTTs be used in place of Dedicated Temp Tables?.........................................................................................................14 Chapter 4 - Tablespace Selection..........................................................................................................................14 Locally Managed Tablespaces 15 Advantages of Locally Managed...............................................................................................................................................15 Space Management....................................................................................................................................................................15 Locally Managed - AUTO ALLOCATE..................................................................................................................................15 Locally Managed - UNIFORM EXTENT ................................................................................................................................15 Temporary Tablespaces 15 Tempfile based...........................................................................................................................................................................16 UNDO Management 16 Automatic Undo Management...................................................................................................................................................16 Chapter 5 - Maintaining Indexes ...........................................................................................................................17 Index Tips Rebuilding of Indexes Function Based Indexes
© Copyright © 2006 Oracle, Inc. All rights reserved.

17 17 18 ii

7/27/2011

PeopleSoft Red Paper

Chapter 6 - Cursor Sharing....................................................................................................................................20 Use of Bind Variables 20 Application Engine - Reuse Flag...............................................................................................................................................20 SQR/COBOL - CURSOR_SHARING 23 Pros and Cons of CURSOR_SHARING...................................................................................................................................24 Chapter 7 - Batch Server Selection.......................................................................................................................26 Scenario 1: Process Scheduler And Database Server on Different Boxes Scenario 2: Process Scheduler and Database Server on one BOX What is the recommended scenario? 26 26 27

Chapter 8 - Capturing Traces................................................................................................................................28 Online Performance Issues 28 Configuration Settings for Tracing an Online Process.............................................................................................................28 Application Engine Performance Issues 30 Configuration Settings for Tracing an AE Process on the Application Engine.......................................................................30 Configuration Settings for Tracing an AE Process on the Database........................................................................................31 COBOL Performance Issues SQR Reports Performance Issues ORACLE Performance Issues Generating Explain Plan for SQL Using “sqltexplain.sql” 33 33 33 34

Automatic Workload Repository (AWR) 34 Generating a HTML or Text AWR Report:..............................................................................................................................35 AWR report analysis:.................................................................................................................................................................35 Appendix A – Sample script to gather statistics on tables................................................................................40 Appendix B – Validation and Feedback................................................................................................................45 Customer Validation Field Validation 45 45

Appendix C - References.......................................................................................................................................46 Appendix D – Revision History.............................................................................................................................47 Authors.......................................................................................................................................................................................47 Reviewers ..................................................................................................................................................................................47 Revision History........................................................................................................................................................................47

© Copyright © 2006 Oracle, Inc. All rights reserved.

iii

7/27/2011

PeopleSoft Red Paper

Chapter 1 - Introduction
This Red Paper is a practical guide for technical users, database administrators, and programmers who implement, maintain, or develop applications for a PeopleSoft system. In this Red Paper, we discuss guidelines on how to improve the performance of PeopleSoft applications in the Oracle 10g environment. Much of the information contained in this document originated within the PeopleSoft Benchmarks and Global Support Center and is therefore based on "real-life" problems encountered in the field. The issues that appear in this document are the problems that prove to be the most common or troublesome.

STRUCTURE OF THIS RED PAPER
This Red Paper provides guidance to get the best performance of PeopleSoft in the Oracle database environment. Keep in mind that PeopleSoft updates this document as needed so that it reflects the most current feedback we receive from the field. Therefore, the structure, headings, content, and length of this document is likely to vary with each posted version. To see if the document has been updated since you last downloaded it, compare the date of your version to the date of the version posted on Customer Connection.

RELATED MATERIALS
This paper is not a general introduction to environment tuning and we assume that our readers are experienced IT professionals, with a good understanding of PeopleSoft’s Internet Architecture and Oracle database. To take full advantage of the information covered in this document, we recommend that you have a basic understanding of system administration, basic Internet architecture, relational database concepts/SQL, and how to use PeopleSoft applications. This document is not intended to replace the documentation delivered with the PeopleTools 8 or 8.4 PeopleBooks. We recommend that before you read this document, you read the PeopleSoft application related information in the PeopleBooks to ensure that you have a well-rounded understanding of PeopleSoft batch process technology. Note: Much of the information in this document eventually gets incorporated into subsequent versions of the PeopleBooks. Many of the fundamental concepts related to performance tuning in PeopleSoft PeopleBooks: • PeopleSoft Installation Guide - Oracle Tuning chapter

Additionally, we recommend that you read the Oracle 10g database administration and performance tuning guides.

© Copyright © 2006 Oracle, Inc. All rights reserved.

1

that are considered “stale” or “missing” by the database. time and window of each organization. By generating statistics only on the “non-temporary” tables and indexes. You need to work with your DBA to come up with a strategy to do that. All rights reserved.Generating Statistics When using Oracle's Cost Based Optimizer (CBO). You can determine whether this job exists by viewing the DBA_SCHEDULER_JOBS view. statement is listed below. The ability to generate statistics in parallel significantly reduces the time needed to refresh object statistics. To disable the GATHER_STATS_JOB execute the following SQL*Plus command: BEGIN DBMS_SCHEDULER. Cursor invalidation could cause severe performance degradation. and re-generate statistics on them which is not desirable as many will not contain data. business rules. have their statistics re-generated. The default “GATHER_STATS_JOB” will pick up the “temporary” tables. Note: The use of procedures within DBMS_STATS is recommended exclusively. / The reasoning for this recommendation is because PeopleSoft Application Engine (AE) programs use many “standard” Oracle tables as PeopleSoft “temporary” tables. Inc. Only “non-temporary” PeopleSoft tables and indexes are recommended to have their statistics updated. query performance depends greatly on appropriate table and index statistics. © Copyright © 2006 Oracle. after loading a significant number of rows into a table. After updating data in a table. collect new statistics on the number of rows.7/27/2011 PeopleSoft Red Paper Chapter 2 . For example. It is advisable to gather statistics periodically for objects where the statistics become stale over time because of changing data volumes or changes in column value. 2 . It is not recommended that statistics be gathered on objects during peak operational hours. the “temporary” object statistics are not updated with improper values. Oracle 10g Scheduler contains a default nightly job which attempts to maintain these vital statistics. It is recommended to disable this job after initial execution. By re-generating statistics only on “stale” or “missing” objects. It is also recommended that only tables and indexes. ANALYZE will be de-supported in future releases of Oracle. At database creation. A sample SQL Since this job does not/cannot take into account the requirements for PeopleSoft. It is not possible to recommend a single command line on how to update statistics nor the frequency on when to update statistics since this is dependent on many factors like data distribution.You should use DBMS_STATS package to update statistics. Maintenance of these statistics is critical to optimal database and query performance. A sample script to provide this functionality is listed in the Appendix. New statistics should be gathered after a schema object's data or structure are modified in ways that make the previous statistics inaccurate. it is not recommended to allow this job to run after it has initially executed. you need new statistics on the average row length. the over all time needed to regenerate statistics on a nightly/weekly/monthly basis is reduced.DISABLE('GATHER_STATS_JOB'). SELECT * FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'GATHER_STATS_JOB'. END. MANUALLY GATHERING TABLE STATISTICS The DBMS_STATS package provides the ability to generate statistics in parallel by specifying the degree of parallelism.

AUTO_SAMPLE_SIZE” and is the recommended value only if the data composition is unknown. However. Data distribution is also gathered when using DBMS_STATS. © Copyright © 2006 Oracle. The size_clause is defined as size_clause:= SIZE {integer | REPEAT | AUTO | SKEWONLY} • • • integer : Number of histogram buckets: Range [1 to 254]. 3 .cascade . AUTO : Determines the columns to collect histograms based on data distribution and the workload of the columns. Note: Specifying “NULL” for “ESTIMATE_PERCENT” will provide the same functionality as ANALYZE’s “COMPUTE”.CASCADE => 'ORAVOL' => 'PS_CUSTOMER' => NULL => DBMS_STATS.” the associated indexes will also be analyzed. Execute tests to find the appropriate value.GATHER_DICTIONARY_STATS( estimate_percent DBMS_STATS. The default value is “For All Columns Size Auto”.options => => 5 => TRUE => 'GATHER AUTO' ). Values between “5%” and “20%” tend to provide the best balance between speed and calculation accuracy. The index statistics cannot make use of this flag and does not run in parallel. Inc. The default value for “ESTIMATE_PERCENT” is “DBMS_STATS.AUTO_SAMPLE_SIZE . Note: It is strongly recommended to read Note 237293.DEGREE .degree .1 of Oracle Metalink. Oracle will automatically determine which columns require histograms and the number of buckets (size) of each histogram. Using a value of “100” is not the same as “COMPUTE”.ESTIMATE_PERCENT . • SKEWONLY : Determines the columns to collect histograms based on the data distribution of the columns.PARTNAME . REPEAT : Collects histograms only on columns that already have histograms. The default setting for “CASCADE” is “FALSE”. The most basic information about the data distribution is the maximum value and minimum value of the column within a table. An example of this command is as follows: EXECUTE DBMS_STATS.TABNAME . With the “CASCADE” parameter set to “TRUE.7/27/2011 PeopleSoft Red Paper Sample DBMS_STATS Command: EXECUTE DBMS_STATS. Note: Specifying the DEGREE will only help run gather table statistics (Partitioned or Non-Partitioned) in parallel. “AUTO_SAMPLE_SIZE” can perform slowly for large tables. Sometimes.AUTO_SAMPLE_SIZE =>'FOR ALL COLUMNS SIZE AUTO' => 5 => TRUE ). this level of statistics may not be sufficient for the optimizer's needs if the data within the column is skewed. All rights reserved. GENERATING STATISTICS FOR DATA DICTIONARY TABLES It is recommended to generate statistics on dictionary tables after initial database is loaded with data and also whenever database size has increased considerably.GATHER_TABLE_STATS( OWNNAME . This note includes a set of notes which help DBA through examples to move updating statistics from ANALYZE to DBMS_STATS. With the “METHOD_OPT” parameter set to “For All Columns Size Auto”.METHOD_OPT .

It is highly recommended that system statistics be gathered.DMS) to change the default setting or to add a required SAMPLE ROWS/PERCENT for the ESTIMATE clause. Note: User must have DBA privileges or GATHER_SYSTEM_STATISTICS role to update dictionary or system statistics.7/27/2011 PeopleSoft Red Paper Generating System Statistics When Oracle gathers system statistics. All rows are truncated (if dedicated) or deleted (if shared) at the end of an AE execution.GATHER_TABLE_STATS (ownname=> [DBNAME]. an AE program can use the meta-SQL “%UpdateStats” after rows are populated into a temporary table. These temporary tables will have few or no rows in the beginning of the process. Use the supplied script (DDLORA. 3. Inc. The statistics are collected using the DBMS_STATS. A temporary table’s life cycle is as follows: 1. Doing so would update statistics on the temporary table prior to the table’s use in following SQL statements. estimate_percent=>1. Due to the implicit commit feature that Oracle uses when performing DDL (Statistics gathering is considered DDL). these tables will again have few or no rows. Note: Commit is required prior to executing the %UpdateStats statement. Rows are populated. it analyzes system activity in a specified time period (workload statistics) or simulates a workload (no workload statistics). Keeping the statistics up to-date for these tables is somewhat challenging. Note: To reduce the increased overhead of DBMS_STATS at runtime (when compared to ANALYZE with estimate). Beginning with PeopleSoft 8. All rights reserved. For example: © Copyright © 2006 Oracle. At the end of the process. All rows are truncated (if dedicated) or deleted (if shared) at the beginning of an AE execution automatically.cascade=>TRUE). or dedicated temporary tables in the batch processes. EXECUTE DBMS_STATS. Note: PeopleSoft stores the default syntax for the gather stats command in a table PSDDLMODEL.48 will issue the Oracle database command: DBMS_STATS. the ESTIMATE_PERCENT parameter was set to “1”. Allowing the implicit commit may affect the restart capability of the program.GATHER_SYSTEM_STATS (gathering_mode => 'NOWORKLOAD'). 2. 4 .GATHER_SYSTEM_STATS procedure. the AE will ignore the %UpdateStats command after any uncommitted changes. Example Command in SQL Step of an Application Engine program: %UpdateStats(%Table(INTFC_BI_HTMP)) This meta-SQL starting with Peopletools 8. STATISTICS AT RUNTIME FOR TEMPORARY TABLES PeopleSoft uses shared and. if the programmer has requested. at runtime. This is not performed automatically. tabname=>[TBNAME]. method_opt=> 'FOR ALL COLUMNS SIZE 1'.

method_opt=> 'FOR ALL INDEXED COLUMNS SIZE 1'. All rights reserved. Edit the DDLORA.5 0 F e t c h Count Time 0.18 . Modify %UpdateStats to use Analyze command: If you suspect that DBMS_STATS is causing performance degradation of your AE process. we want to change the ESTIMATE_PERCENT option of LOW option to be 5% and HIGH option to be 80%. If this feature is to be turned off.0 Time 19. 1. 5 .$long DBMS_STATS. 4. tabname=>[TBNAME]..44. If you find any temporary table that was not updated during the run time..UpdStat) (SQL) RECSTATS PS_JCF_BAL_TAO4 LOW /  Row(s) affected: 1 C o m p i l e Total SQL Statement E x e c u t e 2 Count Time 19.0. // 2.S Count Time 2 0. you can revert %Updatestats to use the Analyze command by doing the followings: Step 1: Create PSSTATS package as follows: Login SQLPLUS as PeopleSoft Dbowner to create the following PSSTATS package.0. Having the update statistics at the runtime incurs some overhead. Run the modified DDLORA.UpdStat.2.. estimate_percent=>80..(GL_JEHDR.. you can review your AE trace.InsBalT.0. CREATE OR REPLACE PACKAGE PSSTATS AS © Copyright © 2006 Oracle..cascade=>TRUE).17. Turning off %UpdateStats Note: Due to this change affecting the entire process scheduler.2. and look for statements that used the “RECSTATS” command: -. it is highly not recommended to turn this feature off.. then plan to use a manual method of updating the statistics.DMS delivered script: The first occurrence of the DBMS_STATS is used for the LOW option of %UpdateStats.DMS through DataMover. check the process scheduler documentation. Inc.. tabname=>[TBNAME].cascade=>TRUE). // 5.$long DBMS_STATS.0 Once you confirm that using DBMS_STATS to update statistics is causing a lot of overhead when compared to “Analyze with estimate” when using %Updatestats.7/27/2011 PeopleSoft Red Paper Let’s assume.GATHER_TABLE_STATS (ownname=> [DBNAME].0. method_opt=> 'FOR ALL INDEXED COLUMNS SIZE 1'. The second one is used for the HIGH option of %UpdateStats.GATHER_TABLE_STATS (ownname=> [DBNAME]. estimate_percent=>5.5 InsBalT. Make sure the temporary table statistics have been handled as shown above.

© Copyright © 2006 Oracle. / Step 2: Modify SQL#4 and SQL#5 DDL Model Defaults for Oracle Platform. BEGIN if stats_mode <> 'HIGH' then command_text := 'ANALYZE TABLE '||tab_name||' ESTIMATE STATISTICS'.1) Navigate to DDL Model Defaults Navigation: PeopleTools -> Utilities -> Administration -> DDL Model Defaults Click the “Search” button and then choose “Oracle” Platform. Inc. stats_mode varchar2).7/27/2011 PeopleSoft Red Paper PROCEDURE ANALYZE_TABLE (tab_name VARCHAR2. / CREATE OR REPLACE PACKAGE BODY PSSTATS AS PROCEDURE ANALYZE_TABLE (tab_name IN VARCHAR2. 6 . END PSSTATS. END PSSTATS. END ANALYZE_TABLE. stats_mode varchar2) IS command_text VARCHAR2(2000). EXECUTE IMMEDIATE command_text. else command_text := 'ANALYZE TABLE '||tab_name||' COMPUTE STATISTICS'. end if. All rights reserved. 2.

7 .3) Replace SQL#4 (out of 5) for Oracle Platform. Copy “Model SQL” from PIA page to text file so that you can revert back to using DBMS_STATS in the future if you so choose.7/27/2011 PeopleSoft Red Paper 2. © Copyright © 2006 Oracle.2) Choose SQL #4 (out of 5) for Oracle Platform. All rights reserved. Inc. 2.

psstats. Copy “Model SQL” from PIA page to text file so that you can revert back to using DBMS_STATS in the future if you so choose.4) Choose SQL #5 (out of 5) for Oracle Platform. All rights reserved.stats_mode=>'LOW').analyze_table(tab_name=>[TBNAME]. 8 . PeopleSoft Red Paper 2. Inc.analyze_table(tab_name=>[TBNAME]. 2.5) Replace SQL#5 (out of 5) for Oracle Platform. © Copyright © 2006 Oracle.7/27/2011 psstats.stats_mode=>'HIGH').

to estimate table cardinality. How does Dynamic Sampling work? Oracle determines at compile time whether a query would benefit from dynamic sampling.7/27/2011 PeopleSoft Red Paper This change will affect any PeopleSoft programs that use %UpdateStats. A histogram partitions the values of the column into bands. All rights reserved. and DataMover import scripts with option “Set statistics on” (On is the default value). CBO uses data within the histograms to get accurate estimates of the distribution of column data. This feature is controlled by the initialization parameter named OPTIMIZER_DYNAMIC_SAMPLING. Note: Due to this change affecting all the programs using %UpdateStats. The sample cardinality can also be used. and to apply the relevant single table predicates to estimate predicate selectivities. If so. resulting in optimal execution plans with non-uniform data distributions. in some cases. Tuning off Dynamic Sampling: Dynamic Sampling was introduced in Oracle 9i. It is not recommended to use Analyze to update statistics during regular database maintenance window. 9 . Since most of PeopleSoft programs use %UpdateStats to manage statistics of our temporary tables so we recommend to turn this parameter off by setting the following: OPTIMIZER_DYNAMIC_SAMPLING = 0 HISTOGRAMS What are Histograms? Histograms provide improved selectivity estimates in the presence of data skew. it is highly recommended to do regression test throughly before implementing in Production. so that all column values in a band fall within the same range. Inc. a recursive SQL statement is issued to scan a small random sample of the table's blocks. Any column and index statistics are also collected on the fly. © Copyright © 2006 Oracle.

due to additional issues BP causes.7/27/2011 PeopleSoft Red Paper Oracle uses height-balanced histograms or frequency based histograms based on the number of distinct values and the number of bands. Histograms are not useful for columns with the following characteristics: • • • • Column data is uniformly distributed. the automatic creation of histograms is deactivated. Columns that are frequently used in WHERE clauses of queries. All rights reserved. Histograms are persistent objects. Viewing Histograms Information about whether a table contains histograms can be displayed using the following dictionary views: • • • USER_HISTOGRAMS ALL_HISTOGRAMS DBA_HISTOGRAMS The number of bands within a column’s histogram can be displayed using the following dictionary views: • • USER_TAB_COLUMNS ALL_TAB_COLUMNS • DBA_TAB_COLUMNS © Copyright © 2006 Oracle. 2. histograms should be created on: 1. But. Note: “Bind Peeking” (BP) was designed to “fix” the last bullet point above. the CBO can make fairly accurate estimates about the cost of executing a particular statement without the use of histograms. the “SIZE AUTO” value instructs the “DBMS_STATS” procedure that only columns benefiting from histograms are to be generated. are static and only change when new statistics are generated with the “SIZE” option within the DBMS_STATS procedures. For uniformly distributed data. Note: If any other value for “METHOD_OPT” is provided (ex. Based on column usage within runtime SQL “where clauses” and the amount of data skew within the column. there are maintenance and storage costs for using them. 3. 10 . So. Histograms. Candidate Columns for Histograms Within PeopleSoft Applications Histograms can affect performance and should be used only when they substantially improve query plans. like all other optimizer statistics. ORD_STATUS are likely candidates that benefit from histograms. Column is not used in WHERE clauses of queries. Column is unique. Have a highly skewed data distribution. the use of BP is not recommended. Creating Histograms Creation of specific column histograms is no longer needed as long as “DBMS_STATS” procedures are used with the “METHOD_OPT” parameter containing “SIZE AUTO”. Inc. In general. “… SIZE 1” or “… SIZE REPEAT”). Literal value is provided instead of using a bind variable for the given column in the where clause. Columns such as PROCESS_INSTANCE. Please refer to Oracle documentation for more details. Column is used in the where clause but contains a bind variable instead of a literal.

configure the initialization parameters of the database to include a seperate buffer cache for this new block size.Dedicated Temporary Tables WHAT ARE DEDICATED TEMP TABLES? Batch processes written in Application Engine use PeopleSoft designated temporary tables (also called as “Dedicated Temporary Tables”) for better processing. Here is the property window for the AE program Bill Finalization (BIIF0001): The instance count specified here is the limit on the number of a temp table's instances that can be used when multiple instances of the program are run. Performance Tips for Dedicated Temp Tables If issues are found with parallel truncates on dedicated tempory tables. Required temp tables are linked to the AE program in the program property window. PeopleSoft designated temporary tables are built using Oracle tables. When implemented on Oracle databases. If the number of programs run are more than the specified count (10 in this example). Then. APPLICATION ENGINE PERFORMANCE WITH DEDICATED TEMPORARY TABLES © Copyright © 2006 Oracle. This may lessen the contention during parallel truncates.7/27/2011 PeopleSoft Red Paper Chapter 3 . And the required number of instances is also specified for each AE program. create seperate tablespace for the these tables with a block size that is greater (if possible) than the current standard tablespace block size. 11 . Inc. This technique minimizes potential locking issues and improves processing time. These are regular Oracle tables but flagged as temporary in the PeopleSoft dictionary tables. then the additional processes will be abandoned or the base temp tables will be used depending on the Runtime radio button selection in the above window. All rights reserved.

© Copyright © 2006 Oracle.7/27/2011 PeopleSoft Red Paper How do temp tables work in Application Engine? Based on the number of temp tables that are associated to an application engine program and the number of instances setup for the program. unless you are using EPM. All rights reserved. Choosing the Continue for the runtime option will use the base temp table if there are no temp table instances available at the time of run. Tools Properties AE Properties Setup the Instance Count to the required value. Inc. Temp Tble Instance (Total) will be same as the online number. the appropriate temp table instance will be used during the runtime. PROCESS PROCESS 4 5 If the Batch Only option is selected. Number of temp table instances Number of Temp Tables (Online) = 3 Number of Temp Tables (AE Program) = 3 Scenario 1: ‘Batch Only’ option is not selected Total number of temp table instances created for each temp table associated to the AE program = Base Temp Table + Number of Temp Tables (Online) + Number of Temp Tables (AE Program) = 1+3+3 = 7 Scenario 2: ‘Batch Only’ option is selected Total number of temp table instances created for each temp table associated to the AE program = Base Temp Table + Number of Temp Tables (AE Program) = 1+3 = 4 In this example we will be looking at Scenario 2. 12 . Temp table settings Setup the Temp Tble Instance (online) as per the requirement. You don’t need to change this setting unless you are advised to do so. This should be equivalent to the number of concurrent streams you are planning to run. Test case explaining temp table behavior Here is the sample scenario that explains the temp table usage. that means that the program will not be called from online.

and 3. Frequent deletes and inserts could cause fragmentation for the base temp tables. Number of concurrent executions The number of concurrent executions in this example is 6. The subsequent parallel streams will use the rest of the instances in sequence. Max API Aware value should be larger than or equal to the total of Max Concurrent value set of all the process types. AE Program issues a delete for the base temp tables while it truncates the temp table instances. setup a temp table instance even if you are planning to run only one process at a time.5th. there could be a possibility of contention. the program will not find an available temp table instance and will use the base temp table. Drawbacks Use of base temp tables for any AE process is not recommended due to the following reasons. 3. So. 1.2. Recommendations 1. All rights reserved. 2. The final three are using the base temp tables. Runtime table statistics on the base temp tables are ignored. Inc. 4. where as the number of available temp table instances are just 3.7/27/2011 PeopleSoft Red Paper Temp table AE PROCESS AE PROCESS STREAM 4 AE PROCESS STREAM 5 STREAM 6 TAB1_TAO TAB2_TAO TAB3_TAO TAB4_TAO Not advisable AE PROCESS STREAM 1 TAB1_TAO1 TAB2_TAO1 TAB3_TAO1 TAB4_TAO1 AE PROCESS STREAM 2 TAB1_TAO2 TAB2_TAO2 TAB3_TAO2 TAB4_TAO2 AE PROCESS STREAM 3 TAB1_TAO3 TAB2_TAO3 TAB3_TAO3 TAB4_TAO3 allocation When the program runs for the first time. and 6th streams. 13 . the first three concurrent streams will use the instance counts 1. 3. In this example. temp table instance 1 will be used. As multiple streams use the same base temp table. Setup required value for the process scheduler server in the max concurrent field. the first three processes are using the temp table instance. Always setup an adequate number of temp table instances to achieve good performance. 2. © Copyright © 2006 Oracle. To overcome the drawbacks described above. When the user tries to run the 4th.

Chapter 4 .========================================================================= . which can be used as temporary processing tables for any batch process. Also. Table data is deleted once the session is closed or the transaction is committed. During the table creation time.7/27/2011 PeopleSoft Red Paper 4. there is no direct method to specify the dedicated temp tables as GTTs. defined with a generic process type of Application Engine as defined .Tablespace Selection © Copyright © 2006 Oracle. [PSAESRV] . Can GTTs be used in place of Dedicated Temp Tables? As of now PeopleSoft does not provide a script or utility to create the GTTs. The max instance should reflect the max concurrency set for process type . These tables are session specific. 14 . Instances of a global temporary table will be created at the runtime in the user's temporary tablespace. Use of DTTs is recommended even when the process is running in single stream. All rights reserved.========================================================================= . CREATING PEOPLESOFT TEMPORARY TABLES AS ORACLE GLOBAL TEMP TABLES (GTT) What are Global Temporary Tables? Oracle8i introduced Global Temporary Tables (GTT). there is no way to restart the program. Important caution while using the GTTs is Application Engine's ability to restart: Since GTTs lose the data when the session ends.------------------------------------------------------------------------. Settings for Application Engine Tuxedo Server . Creating PeopleSoft temporary tables as GTTs is not recommended. in the Server Definition page in Process Scheduler Manager Max Instances =12 5. Setup required number of PSAESERV processes on the process scheduler server. it gives the option to preserve or delete the rows after the commit. Inc.

With this option. The creation of dictionary managed tablespaces is scheduled for de-support by Oracle. Object storage clause specification is not required (and is ignored) with these tablespaces. and large with different uniform extent sizes and placing the tables in an appropriate tablespace depending on its size may give optimal performance. Make sure to specify appropriate size to avoid the table creation with more number of extents. Fragmentations is reduced but not completely eliminated. Uniform extent gives best predictability and consistency. 15 . Having the consistent extent size eliminates wastage of tablespace as "holes". All rights reserved. the size of each extent would be fixed to the specified size. CREATE TABLESPACE TS_PERM_LOC_AUTO size 100M datafile '/perm/ora/ts_perm_loc_auto. You can use the BLOCKSIZE clause to specify a non-database default block size for the tablespace. Advantages of Locally Managed • • • • • Reduced recursive space management Reduced contention on data dictionary tables and space management latches No coalescing required No rollback generated for space allocation and de-allocation activities.dbf' EXTENT MANAGEMENT LOCAL AUTO ALLOCATE.7/27/2011 PeopleSoft Red Paper PeopleSoft's supplied create scripts will create only Locally Managed tablespaces. extent size allocation is performed by Oracle. Extent management is done within the datafile/tempfile using the bitmaps. It will be easier for the DBA to do capacity planning but proper planning should be done to determine the optimum extent size. and the integer you specify in this clause must correspond with the setting of one DB_nK_CACHE_SIZE parameter setting. Inc. This is the preferable method if the tablespace holds the objects with various sizes.AUTO ALLOCATE With this option. LOCALLY MANAGED TABLESPACES Locally Managed Tablespaces (LMT) are the default starting in Oracle 9i. medium. TEMPORARY TABLESPACES © Copyright © 2006 Oracle. Planning to create different category tablespaces such as small.dbf' EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K. you must have the DB_CACHE_SIZE and at least one DB_nK_CACHE_SIZE parameter set. the extent size is managed by Oracle depending on the object size. Locally Managed . In order to use different block sizes in a database.UNIFORM EXTENT With this option. Space Management • • • • Free extents recorded in bitmap (so some part of the tablespace is set aside for bitmap) Each bit corresponds to a block or group of blocks Bit value indicates free or unused Common views used are DBA_EXTENTS and DBA_FREE_SPACE Locally Managed . CREATE TABLESPACE TS_PERM_LOC_UNI size 100M datafile '/perm/ora/ts_perm_loc_uni.

only the Locally Managed with UNIFORM EXTENT management is allowed. Example : CREATE DATABASE INVDB … DATAFILE '/data3/oradata/INVDB/system/system01. Tempfile based Oracle introduced this new type that uses tempfile instead of datafile. instead of distributing undo space in a set of statically allocated rollback segments. rather than allocating a segment (and potentially many extents) for each sort. This should be a preferred method for any Temporary Tablespace. This will give better extent management and space management than the datafile based ones. You cannot specify nonstandard block sizes for a temporary tablespace.dbf' SIZE 1024M SIZE 5048M. Advantages : • • • Space management (extent allocation and de-allocation) is locally managed. Inc. 16 . Automatic undo management lets you allocate undo space in a single undo tablespace. If a database is up-graded from 9i. a regular tablespace cannot be assigned as the temporary tablespace.7/27/2011 PeopleSoft Red Paper Every database user should be assigned a default temporary tablespace(s) to handle the data sorts. The sort segment created for each instance is reused. CREATE TEMPORARY TABLESPACE TS_TEMP_LOC_UNI size 100M tempfile '/temp/ora/ts_temp_loc_uni. The ONLY way to have automatic undo management requires you specify an undo tablespace. UNDO MANAGEMENT Automatic Undo Management This is the preferred method of undo management and is the default when creating a new 10g database. It flags as an error when the tablespace assigned is not a true Oracle temporary tablespace. You need to specify the UNDO_TABLESPACE initialization parameter to tell oracle which tablespace to use for undo and then create that tablespace while creating the database.dbf' EXTENT MANAGEMENT LOCAL LOGFILE …. Oracle server handles the creation and allocation of space among the undo segments automatically. convert the database to use automatic UNDO management instead of rollback segments. In Oracle 10g. All rights reserved. DEFAULT TEMPORARY TABLESPACE TEMPTS1 ……… UNDO TABLESPACE UNDOTS DATAFILE '/data4/oradata/INVDB/undo/undots01. All processes performing sorts reuse existing sort extents of the sort segment. © Copyright © 2006 Oracle. In this type of tablespace.dbf' EXTENT MANAGEMENT LOCAL UNIFORM SIZE 500K.

The reverse may also be true. Sometimes. 2. little information about index rebuilding criteria seems to be available pertaining specifically to 10g.7/27/2011 PeopleSoft Red Paper Chapter 5 . an index not used within a batch process may be useful with an online page. Oracle has consciously decided to not coalesce near-empty blocks or re-balance physical index blocks. Consider adding additional indexes depending on your processing/performance needs. these deleted/empty blocks must still be read. all the rows are logically deleted.1 “Guidelines on When to Rebuild a B-Tree Index”.1.1 “ORACLE8i . Note 122008.Coalescing Indexes”. Dated 06-MAY-2005: This note is labeled for versions 7. This decision causes the deleted blocks to linger within the index until it is rebuilt. Please read note 77574.x. 3.3 to 10. 4. This note provides a script that may be used to determine whether an index may be a candidate for rebuilding.0 to 9i inclusive. During “Range Scan” and “Full Index Scan”. Dated 20-OCT-2005: This note is labeled for version 8i only. Note about use of “Index Skip Scan” access method: “Index Skip Scan” is not a recommended access method as it can be very slow when accessing a large index. Inc. All rights reserved.1 and provides a good basis for determining whether an index should be rebuilt. INDEX TIPS 1. causing the performance degradation. Note: If a very very large index is evaluated. © Copyright © 2006 Oracle. but physically they still linger within until the index is rebuilt. Three metalink notes were found that might provide a little insight as to when to rebuild or coalesce an index. a threshold of “5 or more” levels may be too shallow. May indirectly be usable for version 10. For runtime performance reasons. Review the index recommendation document supplied by the product to see if any of the suggestions apply to your installation.  Note 77574. Index deletion could severely impact other program’s performance.   17 . Note 99618.Maintaining Indexes PeopleSoft supplied indexes are generic in nature. pros and cons for selecting it and index rebuilding.1 “Script: Lists All Indexes that Benefit from a Rebuild”. REBUILDING OF INDEXES It is recommended that an index should be rebuilt when a performance issue is found where a SQL execution plan is accessing an index either by a “range scan” or “full index scan” and a significant number of logical IOs (and may be physical IOs) are witnessed for a relatively small number of rows returned by the scan. Perform thorough system analysis prior to deleting any index. Depending on the customer's business needs and data composition. As of this writing. It uses the suggested values from note 77574.1 before using this script. Dated 20-OCT-2005: This note is labeled for versions 7. but does provide the describing what “index coalescing” is. Examine the available indexes and remove any of the unused indexes to boost the performance of Insert/Update/Delete DML. index requirements may vary. Typically this can happen when a large number of rows have been deleted from the table. This note is referenced by note 122008. Within the index. Run the Oracle trace/TKPROF report for a process and check the access paths to determine the usage of indexes.2 inclusive. The following few tips will assist the DBA to manage indexes efficiently.

NAME1 FROM PS_CUSTOMER WHERE NAME1 LIKE 'ADVENTURE%'. ACCOUNT. it will show something like SYS_NC00033$ which is a system-generated column name.CUST_ID. All rights reserved.CUST_ID.48. Test case: Table PS_CUSTOMER has an index PS0CUSTOMER with NAME1 as leading column: SELECT SETID.----------------SHARE 1008 Adventure 54 Query uses the PSFCUSTOMER index.--------------.CUST_ID. gives no rows.NAME1 FROM PS_CUSTOMER WHERE UPPER(NAME1) LIKE 'ADVENTURE%'. Note: Please review the documentation pertaining to function based indexes prior to their creation.--------------.--------------. In such cases. Here is an example: CREATE UNIQUE INDEX PS_GL_ACCOUNT_TBL ON PS_GL_ACCOUNT_TBL (SETID. These indexes are considered as Function-based indexes in Oracle. © Copyright © 2006 Oracle. SELECT SETID.7/27/2011 PeopleSoft Red Paper FUNCTION BASED INDEXES A function-based index is an index on an expression. But. SQL> SETID CUST_ID NAME1 ----.NAME1 FROM PS_CUSTOMER WHERE NAME1 LIKE 'Adventure%'. PeopleSoft generates indexes with DESCENDING column. SQL> No rows selected Query uses index PS0CUSTOMER and returns the result faster. But. the data returned is correct. Inc.----------------SHARE 1008 Adventure 54 Query uses index PS0CUSTOMER and returns the result faster.CUST_ID. SQL> SETID CUST_ID NAME1 ----. SELECT SETID. To find the real column name.----------------SHARE 1008 Adventure 54 Query does not use the PS0CUSTOMER index so it takes a long time to return. It is recommended that customer support be contacted prior to a functional index creation. 18 . If data is stored in mixed case such as the above example. EFFDT DESC) TABLESPACE PSINDEX STORAGE (INITIAL 45056 NEXT 100000 MAXEXTENTS UNLIMITED PCTINCREASE 0) PCTFREE 10 PARALLEL NOLOGGING When you select the descending column name from DBA_IND_COLUMNS.” SELECT SETID. returns the query faster. such as an arithmetic expression or an expression containing a package function.NAME1 FROM PS_CUSTOMER WHERE UPPER(NAME1) LIKE 'ADVENTURE%'. CREATE INDEX ON PSFCUSTOMER ON PS_CUSTOMER (UPPER(NAME1)). the only way to get the result using a consistent case filter is by using the function “UPPER. SQL> SETID CUST_ID NAME1 ----. you have to go look in COLUMN_EXPRESSION of DBA_IND_EXPRESSIONS. Starting with PeopleTools 8. the use of function-based indexes is helpful. and provides the correct output.

peoplesoft.index_name. 19 . All rights reserved.column_expression.index_name order by column_position.index_type.column_name from dba_indexes a. We suggested that you go to the following link http://www4.a.index_name=b.b.column_position from dba_ind_expressions where index_name='PS_GL_ACCOUNT_TBL'.nsf/0/33440EC2DE7C886788257051005AEB72?OpenDocument to check the availability of patches and apply them accordingly to fix the problem and remove the following initialization parameter: _disable_function_based_index=TRUE © Copyright © 2006 Oracle.dba_ind_columns b where b. Inc. Because of multiple Bugs (# 4939157 and 5092688) which cause wrong results or core dump from queries using functional indexes.7/27/2011 PeopleSoft Red Paper select a.com/psdb. PeopleSoft had recommended to disable the functional indexes causing sql(s) that were relying on these indexes to perform in an inefficient manner. select index_name.index_name='PS_GL_ACCOUNT_TBL' and a.

Inc. such statements can typically be made to use bind variables. Oracle has to allocate memory for the statement from the shared pool.5 F e t c h Count Time 0 0.7/27/2011 PeopleSoft Red Paper Chapter 6 . All rights reserved. Setting the CURSOR_SHARING value at the instance level is not recommended in a PeopleSoft environment.6 E x e c u t e Count Time 252 1. When the statement is passed to the database it sends the statement with literal values. If any customizations are performed.Cursor Sharing When a SQL statement that does not exist in the shared pool is executed. As Oracle deals with bind variables efficiently. 20 . In some situations. it has to be parsed fully. The number of hard parses can be identified in a PeopleSoft Application Engine trace (128). The only way to tell the application engine program to send the bind variables is by specifying the Re-Used flag for that statement that needs to use the bind variable. USE OF BIND VARIABLES The number of hard parses can be reduced to ‘one. The following section gives some guidelines to follow to use the bind variables.S C o m p i l e Count Time 252 0. Example: Statement in PC_PRICING.1.10000001 UPDATE PS_PC_RATE_RUN_TAO SET RESOURCE_ID = %Sql(PC_COM_LIT_CHAR. SQR. but these variables are just PeopleSoft specific.0 Total Time 2.BL6100. Oracle introduced this new parameter CURSOR_SHARING as of Oracle8i.%NEXT(LAST_RESOURCE_ID).10000001. the database looks for an exact match of the SQL statement while parsing. and COBOL have been rewritten to address this issue.’ per multiple executes of the same SQL statement by coding the statement with bind variables instead of literals. That means. there are some steps in AE processes that are not using bind variables.20. This happens when certain kinds of statements cannot handle bind variables in some platforms. Most of the PeopleSoft programs written in Application Engine. Relying on Oracle trace output to identify the SQL that are hard parsed due to literal instead of bind variables is somewhat difficult.Reuse Flag PeopleSoft Application Engine programs use bind variables in the SQL statements. The following is an example of of the AE trace(128): SQL Statement BL6100. check the statement syntactically and semantically. By default its values is set to EXACT.20) WHERE PROCESS_INSTANCE = %ProcessInstance © Copyright © 2006 Oracle.1 In Oracle Trace output such statements are shown as individual statements and each statement parses once. it is recommended that the Reuse Flag be set to “Yes” for all program steps. Hard parsing happens when the Oracle server parses a query and cannot find an exact match for the query in the library cache. Application Engine . etc. This is referred to as a hard parse and is very expensive in both in terms of CPU used and in the number of latch gets performed. This occurs due to inefficient sharing of SQL statements and can be improved by using bind variables instead of literal in queries. Some times hard parsing causes excessive CPU usage.

.---------0.7/27/2011 AND AND AND AND AND BUSINESS_UNIT = %Bind(BUSINESS_UNIT) PROJECT_ID = %Bind(PROJECT_ID) ACTIVITY_ID = %Bind(ACTIVITY_ID) RESOURCE_ID = %Bind(RESOURCE_ID) LINE_NO = %Bind(LINE_NO) PeopleSoft Red Paper Statement without Re-Use flag: AE Trace -.BL6100.---------.---------.00 0.Row(s) affected: 1 C o m p i l e Total SQL Statement BL6100.(PC_PRICING.. Inc.---------.1 Oracle Trace Output ******************************************************************************** UPDATE PS_PC_RATE_RUN_TAO SET RESOURCE_ID = 10000561 WHERE PROCESS_INSTANCE = 419 AND BUSINESS_UNIT = 'US004' AND PROJECT_ID = 'PRICINGA1021' AND ACTIVITY_ID = 'ACTIVITYA2042' AND RESOURCE_ID = 'VUS004VA10210124050' AND LINE_NO = 1 call count ------.00 0.10000001.01 0.-----total 2 cpu elapsed disk query current -------.16.6 E x e c u t e Count 252 Time 1.5 F e t c h Count 0 Time 0..---------.00 0 0 0 -------.01 0.---------.46.01 0 2 5 0.S Count 252 Time 0.---------.01 0 2 5 rows ---------0 1 0 ---------1 Misses in library cache during parse: 1 Optimizer goal: CHOOSE Parsing user id: 21 (PROJ84) Rows ------1 2 Rows ------0 1 Row Source Operation --------------------------------------------------UPDATE PS_PC_RATE_RUN_TAO INDEX RANGE SCAN (object id 16735) Execution Plan --------------------------------------------------UPDATE STATEMENT GOAL: CHOOSE UPDATE OF 'PS_PC_RATE_RUN_TAO' © Copyright © 2006 Oracle..0 Time 2.---------0.00 0 0 0 0.10000001) (SQL) UPDATE PS_PC_RATE_RUN_TAO SET RESOURCE_ID = 10000498 WHERE PROCESS_INSTANCE = 419 AND BUSINESS_UNIT = 'US004' AND PROJECT_ID = 'PRICINGA1' AND ACTIVITY_ID = 'ACTIVITYA1' AND RESOURCE_ID = 'VUS004VA10114050' AND LINE_NO = 1 / -.. All rights reserved.-----Parse 1 Execute 1 Fetch 0 ------. 21 .00 .

22 0 509 1284 0.---------.---------.---------.16.10000001.57 .22 0.22 0 509 1284 rows ---------0 252 0 ---------252 Misses in library cache during parse: 1 Optimizer goal: CHOOSE Parsing user id: 21 (PROJ84) Rows Row Source Operation © Copyright © 2006 Oracle..---------.. 22 .00 0.00 0 0 0 -------.(PC_PRICING.Row(s) affected: 1 C o m p i l e Total SQL Statement BL6100.22 0.4 Oracle Trace Output ******************************************************************************** UPDATE PS_PC_RATE_RUN_TAO SET RESOURCE_ID = :1 WHERE PROCESS_INSTANCE = 420 AND BUSINESS_UNIT = :2 AND PROJECT_ID = :3 AND ACTIVITY_ID = :4 AND RESOURCE_ID = :5 AND LINE_NO = :6 call count ------.00 0.---------.0 E x e c u t e Count 252 Time 0. All rights reserved.-----Parse 1 Execute 252 Fetch 0 ------.S Count 1 Time 0.BL6100.7/27/2011 2 PeopleSoft Red Paper INDEX GOAL: ANALYZED (RANGE SCAN) OF 'PS_PC_RATE_RUN_TAO' (UNIQUE) ******************************************************************************** You will see 252 different sqls in the tkprof similar to the one above. Inc..---------.00 0 0 0 0.10000001) (SQL) UPDATE PS_PC_RATE_RUN_TAO SET RESOURCE_ID = :1 WHERE PROCESS_INSTANCE = 420 AND BUSINESS_UNIT = :2 AND PROJECT_ID = :3 AND ACTIVITY_ID = :4 AND RESOURCE_ID = :5 AND LINE_NO = :6 / -.---------0.-----total 253 cpu elapsed disk query current -------.---------0.57...Bind variables: -1) 10000751 -2) US004 -3) PRICINGA1 -4) ACTIVITYA1 -5) VUS004VA10114050 -6) 1 -. Statement with Re-Use flag: AE Trace -.0 Time 0.4 F e t c h Count 0 Time 0.

PSPRCSRQST FOR EACH ROW WHEN ( NEW. Session Level (using trigger): Following sample trigger code can be used to implement the session level option. Every hard parse has some amount of performance overhead.RUNSTATUS != 7 AND NEW. the database looks for a similar statement excluding the literal values that are passed to the SQL statement..RUNSTATUS = 7 AND OLD. This statement gets executed for every combination of BUSINESS_UNIT and INV_ITEM_ID. If you find any programs that are not using bind variables and are not able to modify the code. If you are not willing to change the application program then implementing the session level command though a trigger to give you more flexibility. then adding the ALTER SESSION command at the beginning of the program should be a better option.7/27/2011 ------252 504 Rows ------0 252 504 --------------------------------------------------UPDATE PS_PC_RATE_RUN_TAO INDEX RANGE SCAN (object id 16735) PeopleSoft Red Paper Execution Plan --------------------------------------------------UPDATE STATEMENT GOAL: CHOOSE UPDATE OF 'PS_PC_RATE_RUN_TAO' INDEX GOAL: ANALYZED (RANGE SCAN) OF 'PS_PC_RATE_RUN_TAO' (UNIQUE) ******************************************************************************** SQR/COBOL . Inc. As per the data composition used in this benchmark there were about 13. Above statement uses a literal values in the where clause there by causing a hard parse for each execute. Setting the value at the session level is more appropriate.035 unique combinations of BUSINESS_UNIT and INV_ITEM_ID and about 19. 23 . PS_STOR_LOC_INV SLI WHERE………….. All rights reserved. CREATE OR REPLACE TRIGGER MYDB.PRCSTYPE = 'SQR REPORT' AND NEW.INV_ITEM_ID = 'PI000021' AND ………. © Copyright © 2006 Oracle. FROM PS_PHYSICAL_INV PI. END.SET_TRACE_INS6000 BEFORE UPDATE OF RUNSTATUS ON MYDB. Oracle replaces the literal values with the system bind variables and treats them as single statement and parses once.PRCSNAME = 'INS6000' ) BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET CURSOR_SHARING=FORCE'.580 total executes. NOT EXISTS (SELECT 'X' FROM PS_PICKZON_INV_VW PZI WHERE PZI. Minimizing them will boost the performance.) ORDER BY ….BUSINESS_UNIT = 'US008' AND PZI. Example: Sql Statement issued from SQR/COBOL program: SELECT ……….CURSOR_SHARING Most of the SQR and COBOL programs are written to use bind variables. With this setting. If you identify the program (SQR/COBOL) that is not using the bind variables and need to force them to use the binds at the database level. / Note: Make sure to give ALTER SESSION privilege to MYDB to make this trigger work. then the CURSOR_SHARING option FORCE is useful.

---------104.06 0 49 1 2.69 0 0 0 44.---------.---------98.---------.93 102.---------5.43 3027 1455101 235446 -------.---------.22 0 5577 235 2.---------.22 2957 1670933 568642 rows ---------0 78376 189454 ---------267830 Misses in library cache during parse: 64 Misses in library cache during execute: 1 OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS call count ------.---------.44 2.21 9. Inc.---------. Over all statistics with no bind variables: OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS call ------Parse Execute Fetch ------total count -----26389 404647 517618 -----948654 cpu elapsed disk query current -------.---------. PS_STOR_LOC_INV SLI WHERE …………. 24 .) ORDER BY ….27 99.---------.---------.-----cpu elapsed disk query current -------.08 4784 1699104 606446 rows ---------0 78376 189454 ---------267830 Misses in library cache during parse: 13190 Misses in library cache during execute: 1 OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS call count ------.35 5.---------15.---------.---------.---------.44 15..21 197.7/27/2011 Oracle TKPROF Output with CURSOR_SHARING=FORCE PeopleSoft Red Paper SELECT ……… FROM PS_PHYSICAL_INV PI.42 2.85 47.-----total 115894 cpu elapsed disk query current -------.---------.---------.---------..11 1757 242929 371000 47.---------. NOT EXISTS (SELECT :SYS_B_09 FROM PS_PICKZON_INV_VW PZI WHERE PZI.---------.---------197.---------rows ---------- © Copyright © 2006 Oracle.---------.BUSINESS_UNIT = :SYS_B_10 AND PZI.09 50.54 0 1074 0 51.---------.02 2784 1439571 235104 -------.---------10.47 43.---------.57 1 97241 0 -------. All rights reserved.51 173 231362 333538 45..---------.85 1 102867 236 rows ---------0 229 47621 ---------47850 Misses in library cache during parse: 65 Over all statistics with bind variables: OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS call ------Parse Execute Fetch ------total count -----26389 404647 517618 -----948654 cpu elapsed disk query current -------. Pros and Cons of CURSOR_SHARING By setting the above parameter at the session level the over all processing time reduced significantly.02 43.-----Parse 27118 Execute 33788 Fetch 54988 ------.INV_ITEM_ID = :SYS_B_11 AND …….

7/27/2011 Parse 356 Execute 357 Fetch 667 ------.---------0. All rights reserved.---------.00 0.---------.48 0 5568 228 0.47 0.---------.55 0.59 0 6901 228 PeopleSoft Red Paper 0 228 552 ---------780 Misses in library cache during parse: 1 From the above trace statistics.-----total 1380 0.10 0 0 0 0.01 0 1333 0 -------. it can be seen that the number of library cache misses decreased with the use of bind variables. 25 .08 0. Original Timing 197 Sec Time with CURSOR_SHARING option 102 Sec %Gain 48% © Copyright © 2006 Oracle. Inc.

26 . Have a dedicated network connection between the batch server and the database to minimize the overhead. the impact due to TCP/IP overhead may not be that big. SCENARIO 2: PROCESS SCHEDULER AND DATABASE SERVER ON ONE BOX Scenario 2 SERVER2 Database Server / BatchServer Oracle DB Use Local Connection Process Scheduler Running the Process Scheduler on the database server will eliminate the TCP/IP overhead and improve the processing time. As the batch process may involve extensive SQL processing.7/27/2011 PeopleSoft Red Paper Chapter 7 . © Copyright © 2006 Oracle. The impact is more evident in a process where excessive row-by-row processing is done. As per the PeopleSoft architecture. Inc. SCENARIO 1: PROCESS SCHEDULER AND DATABASE SERVER ON DIFFERENT BOXES Scenario 1 SERVER1 Process Scheduler Batch Server TCP/IP SERVER2 Oracle DB Database Server Running the Process Scheduler on a box other than the database server will use a TCP/IP connection to connect to the database.Batch Server Selection Process Scheduler executes PeopleSoft batch processes. process scheduler (Batch Server) can be setup to run from database server or any other server. At the same time it does use the additional server memory. For the processes where majority of SQL statements are of set based. this TCP/IP can be a big overhead and may impact processing times. All rights reserved.

At the same time. the scenario 2 is recommended where the connection overhead is eliminated. 27 . Make fair judgment depending on your environment and usage. All the Report jobs can be run using scenario 1. All the CRITICAL jobs can be run using scenario 2. it may not be possible to run the extensive batch processes on the database server due to the limited availability of server resources.7/27/2011 PeopleSoft Red Paper Set the following value in the process scheduler configuration file "psprcs. All rights reserved. You could setup both scenarios in your environment and use a specific scenario depending on the time of the run and the complexity of the process. © Copyright © 2006 Oracle. Inc. WHAT IS THE RECOMMENDED SCENARIO? Considering the performance impact due to TCP/IP for the row-by-row processing.cfg" to use the direct connection instead of TCP/IP UseLocalOracleDB=1 This kind of setup is useful for the programs that do excessive row-by-row processing.

The following is basic recommendations that can assist in capturing various traces in order to identify performance issues. “1984” is teh recommended value when tracing with “TracePC”. The trace file will be written in the corresponding application server log directory on the machine where this application server is running. not data) .SQL statements . Sample snippet from psappsrv.cfg . ONLINE PERFORMANCE ISSUES To debug performance issues within online pages. 2 .------------------------------------------------------------------------.oracle.The value “TraceSQL” is to be set. An example name for the file might be: VP1_dhcp-psft-F-2nd-west-10-138-222-59. ----------------.Row Fetch (indicates that it occurred. Inc. Oracle DBMS also provides utilities to capture traces for details on SQL execution during a database session.us. .SQL connect.com. The following minimum settings are recommended within application server’s configuration file. “31” is the recommended value when tracing with “TraceSQL”.SQL statements .SQL statement variables . Example for tracing SQL (TraceSQL): The following options are requested to be traced: 1 2 4 8 + 16 ==== 31 . Note: Running a production environment with any of theses settings may cause significant performance degradation due to the overhead introduced by tracing. it is important to capture trace files for SQL and PeopleCode events. disconnect.Capturing Traces People Tools provides tracing facilities to capture online as wells as batch program flows. the sum of the options requested become the values in which “TraceSQL” and “TracePC” is set. 28 . Make sure to reset the values back to “zero” (a.7/27/2011 PeopleSoft Red Paper Chapter 8 .tracesql within the directory: /data2/ora/pt84803b/appserv/ORAVOL/LOGS Configuration Settings for Tracing an Online Process When setting the values for “TraceSQL” and “TracePC” within the application server’s configuration file.a. Please refer to documentation for complete discussion. stop tracing) after capturing the needed trace files. All rights reserved. commit and rollback . Bit Type of tracing .All other API calls except ssb .k. SQL Tracing Bitfield .SQL statement variables © Copyright © 2006 Oracle. 1 . These recommends are typical but specific scenarios may require additional settings to capture needed details.

128 . 256 . 128 .Show function return value . 2 . 2048 .Mapcore information . Dynamic change allowed for TracePC and TracePCMask TracePC=1984 TracePCMask=4095 Note: It is extremely difficult to perform on-line tracing at the database level (especially on a production environment).------------------------------------------------------------------------.Trace start of programs . contact customer support for more assistance.Show fetched values . 16 . commit and rollback . 256 .Set Select Buffers (identifies the attributes of columns . Inc.Sybase Fetch information .Trace each statement in program . 64 . 1 . a single web server session could use many different database connections. ----------------.SQL connect.Show assignments to variables . PeopleCode Tracing Bitfield .Show parameter values . 29 . All rights reserved. 4096 . 512 . and as database connections are used.Trace internal function calls .List the program . 8 . 32 .Row Fetch (indicates that it occurred. You can also turn on the tracing for a user session by doing the followings: Login using your PIA URL appended with “&trace=y”: For example: PIA URL: http://pbnt0020:4090/psp/ps/?cmd=login Log on using the following: http://pbnt0020:4090/psp/ps/?cmd=login&trace=y You can set your trace settings from the page below before log in: © Copyright © 2006 Oracle.Show stack . This is mainly due to on-line sessions sharing of the database connections.Trace entire program . .Database API specific calls . disconnect. 16 . Bit Type of tracing . not data) . to be selected). 64 .7/27/2011 PeopleSoft Red Paper . 512 . If tracing at the application server level is not adequate. 8192 . 8 .Manager information . 1024 . 4 . Dynamic change allowed for TraceSql and TraceSqlMask TraceSql=31 TraceSqlMask=12319 .Sybase Bind information .All other API calls except ssb . .COBOL statement timings . 4 .Trace external function calls .

Inc. 2 .Trace STEP execution sequence to AET file .Timings Report to AET file © Copyright © 2006 Oracle.not yet allocated . the process scheduler will create a subdirectory under “process scheduler/log/output” directory for each AE process.AET The calculation for the “TraceAE” value is the same as for “TraceSQL” explained above.7/27/2011 PeopleSoft Red Paper APPLICATION ENGINE PERFORMANCE ISSUES Configuration Settings for Tracing an AE Process on the Application Engine When tracing is enabled for AE programs. 1 .cfg . AE Tracing Bitfield . “135” is the recommended value when tracing with “TraceAE”. All rights reserved. As an example. 64 . Bit Type of tracing . the trace directory created for “FS_BP” process might be “AE_FS_BP_7233” containing file named “AE_FS_BP_7233. 8 . 4 .not yet allocated . 32 . Sample snippet from psprcs. 128 . ----------------.Trace Dedicated Temp Table Allocation to AET file .------------------------------------------------------------------------. 16 .not yet allocated .not yet allocated . .Trace Application SQL statements to AET file . 30 .

SQL statements . 2 .Trace each statement in program (recommended) .Show fetched values . 4096 TraceAE= 135 PeopleSoft Red Paper Method/BuiltIn detail instead of summary in AET Timings Report not yet allocated Timings Report to tables DB optimizer trace to file DB optimizer trace to tables If tracing PeopleCode steps with an AE program is necessary. 64 .Trace start of programs . Bit Type of tracing .Show parameter values . 512 .Show stack . 2048 . 31 . commit and rollback . PeopleCode Tracing Bitfield . 128 . Please remember to restore original configuration values after completing the trace. 256 .Trace Evaluator instructions (not recommended) .------------------------------------------------------------------------.Show assignments to variables . SQL Tracing Bitfield . 1024 . ----------------. to be selected). All rights reserved.Sybase Bind information . © Copyright © 2006 Oracle. “1984” is the recommended value when tracing with “TracePC”. 4 .All other API calls except ssb . 128 . 2 . Setting value in AE trace section of process scheduler configuration file.Trace internal function calls . 16 . A raw SQL trace file generated by this setting will be created within the “UDUMP” directory on the database server. the following settings are needed within the process scheduler configuration file to capture both SQL and PeopleCode events during an execution PeopleCode tracing is not generally necessary. Dynamic change allowed for TracePC TracePC=1984 Configuration Settings for Tracing an AE Process on the Database There are two ways to generate a database trace file for AE process: 1. 1024 . Sample snippet from psprcs. 1 .SQL connect. ----------------. 8 . Bit Type of tracing . 512 . 32 . 1024 . 256 . .SQL statement variables .Trace external function calls . 1 .SQL Informational Trace . Inc. 64 .Row Fetch (indicates that it occurred.7/27/2011 . 512 . Dynamic change allowed for TraceSql and TraceSqlMask TraceSQL=31 .Sybase Fetch information .Database API specific calls . 4 . 16 . 2048 .List Evaluator program (not recommended) .cfg .Show function return value . disconnect. 256 .Set Select Buffers (identifies the attributes of columns . but is helpful when trying to debug procedural issues. 8 .COBOL statement timings . not data) . . “31” is the recommended value when tracing with “TraceSQL”.

“2183” is the recommended value when using this method.DB optimizer trace to file .SET_TRACE_POCALC BEFORE UPDATE OF RUNSTATUS ON MYDB. 512 . END.Timings Report to tables . process name. 4096 . A trigger is created to start SQL tracing on the database side for an AE process with customized trace settings.7/27/2011 PeopleSoft Red Paper The raw trace file will contain details of each SQL statement that was executed on the database including its runtime execution plan. / Modify the trigger creation command with the proper values for database name. Inc.cfg . 1 . Generally Level 12 trace is useful to identify SQL performance problems and this captures wait and bind information for all SQL. 32 . use the second method.PSPRCSRQST FOR EACH ROW WHEN ( NEW. 64 . The raw trace will be used as input to the “tkprof” database utility to generate a formatted trace report. EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS = ''10046 TRACE NAME CONTEXT FOREVER. LEVEL 12'''. 2 .DB optimizer trace to tables TraceAE=2183 Note: This setting does not provide wait events and bind variable information.------------------------------------------------------------------------. MYDB is the database name and SET_TRACE_POCALC is the trigger name.Trace STEP execution sequence to AET file .not yet allocated . 256 . AE Tracing Bitfield . Sample snippet from psprcs.not yet allocated . 8 .runstatus != 7 AND NEW.not yet allocated . © Copyright © 2006 Oracle.Timings Report to AET file . and tracefile identifier. 16 . 2. For example.runstatus = 7 AND OLD. 1024 . CREATE OR REPLACE TRIGGER MYDB. If this information is needed. The calculation for the “TraceAE” value is the same as for “TraceSQL” explained above.Trace Application SQL statements to AET file .not yet allocated .prcstype = 'Application Engine' AND NEW.prcsname = 'PO_PO_CALC' ) BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET TIMED_STATISTICS = TRUE'. All rights reserved. 2048 . EXECUTE IMMEDIATE 'ALTER SESSION SET TRACEFILE_IDENTIFIER = ''POCALC'''. Bit Type of tracing . ----------------.not yet allocated .Method/BuiltIn detail instead of summary in AET Timings Report . . 32 . EXECUTE IMMEDIATE 'ALTER SESSION SET MAX_DUMP_FILE_SIZE = UNLIMITED'. 128 .Trace Dedicated Temp Table Allocation to AET file . 4 . to generate trace for an AE process PO_PO_CALC the following trigger needs to be created.

EXECUTE IMMEDIATE 'ALTER SESSION SET MAX_DUMP_FILE_SIZE = UNLIMITED'.PSPRCSRQST FOR EACH ROW WHEN ( NEW.COBOL statement timings .execpu. 1024 . The following is an example trigger creation command for one a SQR report. . PeopleSoft Red Paper Once the raw database trace is captured. 256 . 2 . 32 . along with database SQL trace.Set Select Buffers (identifies the attributes of columns . commit and rollback . to be selected). All rights reserved. 4 . disconnect. 128 . 16 . EXECUTE IMMEDIATE 'ALTER SESSION SET TRACEFILE_IDENTIFIER = ''INS6000'''. / ORACLE PERFORMANCE ISSUES © Copyright © 2006 Oracle.Row Fetch (indicates that it occurred. not data) . Dynamic change allowed for TraceSql and TraceSqlMask TraceSQL=128 SQR REPORTS PERFORMANCE ISSUES Creating a trigger is the only way to generate SQL trace file for SQR reports. execute the program “tkprof” with following sort options: tkprof <trace_input_file> <rpt_output_file> sys=no explain=<user_id>/<password> sort=exeela. 8 . Inc. SQL Tracing Bitfield .Sybase Fetch information .SQL connect. LEVEL 12'''. will help to debug performance issues.Database API specific calls .prscpu.SQL statements . ----------------. 1 . EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS = ''10046 TRACE NAME CONTEXT FOREVER. This report.prcsname = 'INS6000' ) BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET TIMED_STATISTICS = TRUE'.All other API calls except ssb .runstatus = 7 AND OLD. 64 .Sybase Bind information .fchcpu Note: Enabling tracing at the database instance level is never recommended. 33 . CREATE OR REPLACE TRIGGER MYDB.SQL Informational Trace . END.runstatus != 7 AND NEW.SQL statement variables . Bit Type of tracing .prcstype = 'SQR REPORT' AND NEW. COBOL PERFORMANCE ISSUES The following settings are needed within the process scheduler’s configuration file to capture summary report information for a COBOL process.7/27/2011 Note: Drop or disable the trigger once the trace is captured. 512 . .fchela.SET_TRACE_INS6000 BEFORE UPDATE OF RUNSTATUS ON MYDB.

Inc.7/27/2011 PeopleSoft Red Paper The followings are needed when reporting Performance issues in Oracle database to PeopleSoft Global Support Center: 1.ora or spfile. Note: We also document initialization paramaters that could impact performance in here. Confirm that our required minimum patches are installed: • Generate a Patch Inventory list: a. Wait events such as Disk I/O wait. The various metrics collected by AWR include: 1. Network and Memory. If the system has an average of more than 10 active concurrent sessions. Change directory to : cd $ORACLE_HOME/Opatch c. more room may be needed. The details of this utility are provided in Oracle Meta Link Note 215187. For instructions how to run RDA. 2. This information is very useful for solving performance issues and finding the database load at any point in time in the past.com/psdb. Use this link to do so: http://www4. Database initialization parameter “STATISTICS_LEVEL” must be set to “TYPICAL” or “ALL” (“TYPICAL” is the default) and the parameter “TIMED_STATISTICS” must be set to “TRUE” to allow the database to populate the workload repository properly. 3. lock wait. Network wait. © Copyright © 2006 Oracle.1. It is highly recommended to keep this AWR running with default frequency. Send us a copy of your init. 34 . Operating system metrics of CPU . 2. commit wait etc.1 in Oracle Metalink GENERATING EXPLAIN PLAN FOR SQL USING “SQLTEXPLAIN. RDBMS & Third Party Product Patches Required for Installation” Select the Tools Release that you are on.peoplesoft. Note: You can use RDA (Remote Diagnostic Agent) to collect the above informations. replacing the manual “STATSPACK” method in earlier versions. Disk.SQL” For enhanced Explain Plan and diagnostic info for one SQL statement. Issue the following command: opatch lsinventory • Logon to Customer Connection to make sure that all required minimum Patches are being applied.nsf/0/33440EC2DE7C886788257051005AEB72?OpenDocument Search for “Required Operating System.ora. AWR automatically generates snapshots of the performance data once every hour (by default) and collects the statistics in the workload repository. sqltexplain utility is very useful and recommended. AUTOMATIC WORKLOAD REPOSITORY (AWR) Oracle 10g provides an automatic database performance monitoring tool called AWR. Session history details showing top SQL taking time and resource. All rights reserved. Log on to DB server b. History of the snapshots is retained for 7 days (by default) and usually does not occupy more than 300 MB within the SYSAUX tablespace. please refer to Note:414970.

this is not necessary. a snapshot can be manually created just prior and then again just after executing a questionable program. 35 .Therefore. The response time of a given transaction in the database always consists of the following two parts: Response Time = Service Time + Wait Time Where “Service Time” is CPU consumption by the database. Enter value for num_days: 2 4. Specify the number of previous day’s snapshots are to be listed. Enter value for report_type: html 3. and “Wait time” is the sum of all the Wait events in the database.7/27/2011 PeopleSoft Red Paper Generating a HTML or Text AWR Report: To generate an HTML or text AWR report: 1. Enter a output report name or accept the default name: Enter value for report_name: Using the report name awrrpt_1_150_160 6. Typically. A list displaying the snapshot id and time the snapshot was generated will display.sql script from within SQL*Plus and logged in with a user having the DBA role: @$ORACLE_HOME/rdbms/admin/awrrpt. First. In situations where CPU usage is much more significant than Wait Time. the database tuning activity is triggered by users complaining about response time of a transaction or a Batch job.sql 2. Run the awrrpt. If there is need to diagnose a particularly specific issue. © Copyright © 2006 Oracle. Example of manually creating a snapshot via SQL*Plus: BEGIN DBMS_WORKLOAD_REPOSITORY. specify whether a HTML or a text report is wanted. it is less likely that investigating Wait Events will produce significant savings in response time. Enter value for begin_snap : Enter value for end_snap: 5. Inc. With such a list one can quickly identify the main areas to focus on. it is recommended to compare the time taken by the top 5 timed events and direct the tuning effort to the biggest consumers. The AWR report will be generated. Enter the beginning and ending snapshot ID for the AWR report. The response time analysis consists of finding out where time is being spent in a database. All rights reserved. / AWR report analysis: Most of the time.CREATE_SNAPSHOT (). The most important part of the AWR report is the Top 5 Timed Events section. END.

67 3. one needs to look at the Time Model Statistics section..54 1.19 92.) SQL STATISTICS: © Copyright © 2006 Oracle. All rights reserved.883 10.00 134.79 0.5 User I/O 1.658 8.336 28.67 % of DB Time 75. To drill further into the details of the CPU consumption.33 8.02 66.07 0.02 0.65 31.4 System I/O 1. high physical Reads.37 0.92 11.01 0.16 0.7/27/2011 PeopleSoft Red Paper For example: Top 5 Timed Events Event CPU time db file sequential read db file scattered read log file parallel write control file sequential read 4. High Parse.12 0.3 System I/O Wait Class After a glance at the above. Time Model Statistics Statistic Name DB CPU sql execute elapsed time parse time elapsed hard parse elapsed time failed parse elapsed time connection management call elapsed time hard parse (sharing criteria) elapsed time PL/SQL execution elapsed time sequence load elapsed time repeated bind elapsed time DB time background elapsed time background cpu time Time (s) 114.2 13. one will need to look at the Sql Statistics section to look for problem sql’s (such as sql that have high Gets.4 User I/O 8.05 0.2% of the processing time being spent in CPU.284 Waits Time(s) 114 26 12 9 9 12 5 1 0 Avg Wait(ms) % Total Call Time 75.. Inc.20 59. 59% of the total DB CPU is spent in sql execute elapsed time. 36 .00 From the above. the system is CPU bound with 75.40 1.71 2.01 0.59 0.

rebuilding the index will compact its contents into fewer blocks. Find the Top SQL statements with Physical Reads in SQL ordered by Reads section.284 6. b. If Index Range scans are involved. D then we can export the table data in order by B. If this wait event is high then tune it as followed: 1. if the table has columns A. Inc.547 10. If the index being used has a large Clustering Factor.00 Total Wait Time (s) 26 12 9 9 8 6 Avg wait (ms) 12 5 1 0 1 1 Waits /txn 1.00 0.7/27/2011 • • • • • • • PeopleSoft Red Paper SQL Ordered by Elapsed Time: Includes SQL statements that took significant execution time during processing. Wait Events Event db file sequential read db file scattered read log file parallel write control file sequential read db file parallel write control file parallel write Waits 4. again we have to visit more blocks because there is less index data per block.336 28. All rights reserved. Generate the explain plan of the sql statements. In this case.00 0. SQL Ordered by Sharable Memory: Includes SQL statements cursors which consumed a large amount of SGA shared pool memory.16 3. then more table data blocks have to be visited in order to get the rows in each Index block.18 0.839 %Time -outs 0. more blocks than necessary could be being visited if the index is unselective. SQL Ordered by CPU Time: Includes SQL statements that consumed significant CPU time during its processing. To get the details of wait events. a.22 The followings are the most common wait events found in Oracle database: The most common I/O related wait events is “db file sequential read”. SQL Ordered by Parse Calls: These SQLs experienced a high number of reparsing operations. By rebuilding the table with its rows sorted by the particular index columns we can reduce the Clustering Factor and hence the number of table data blocks that we have to visit for each index block. 37 © Copyright © 2006 Oracle.D. c. SQL Ordered by Version Count: These SQLs have a large number of versions in shared pool for some reason. By creating a more selective index. If indexes are fragmented. SQL Ordered by Reads: These SQLs performed a high number of physical disk reads while retrieving data.00 0.00 0. For example.00 1. one should go to Wait Events Statistics section. . B.883 10. C & D and the index is on B. It occurred on single block read for index data or table data accessed through an index.02 1.00 0. SQL Ordered by Gets: These SQLs performed a high number of logical reads while retrieving data. we can access the same table data by visiting fewer index blocks (and doing fewer physical I/Os).74 1. and reload the table.658 8.

looking at the File I/O Statistics section of the AWR report will help us find such hot disks and spread out the I/O by manually moving datafiles to other storage or by making use of Striping. If there is no SQL with suboptimal execution plans and I/O is evenly spread out with similar response times from all disks then a larger Buffer Cache may help. This value is platform-dependent and is 1MB for most platforms. the initialization parameter DB_FILE_MULTIBLOCK_READ_COUNT is now automatically tuned to use a default value when this parameter is not set explicitly. RAID and other technologies to automatically perform I/O load balancing for us. It occurs when a user session issues a COMMIT and is waiting for LGWR to finish flushing all redo from the log buffer to disk. Enable asynchronous I/O or move the controlfiles to less I/O saturated disks. or slow performance of writes to the controlfiles. If this wait event is high then the Top SQL statements with Physical Reads in SQL ordered by Reads section can be investigated to see if their execution plans contain Full Table or Fast Full Index scans. If systemwide waits for this wait event are significant then this either indicates numerous writes to the controlfile (too many control files copies).These typically happen for Full Table Scans and for Fast Full Index scans.1. it will be set to a value that is equal to the maximum I/O size that can be performed efficiently divided by the standard block size. Inc. In this case. It is enabled with the initialization parameter COMMIT_WRITE to change the commit behaviour on SYSTEM. Some general tuning tips for this wait event are: • • Move all the log members to high speed disks Move log members to low I/O activities disk controllers Starting with Oracle 10gR2. Because the parameter is expressed in blocks. “log file single write” and the redo statistics.Large pool and Java pool by setting the parameter SGA_TARGET.7/27/2011 PeopleSoft Red Paper 2. To understand what is delaying the log file sync. If there is no particular SQL statement with bad execution plan. please refer to Metalink Note 336119. then one of the following may be happening: a. Possible solutions can be: • • Reduce the number of controlfile copies to the minimum that ensures that not all copies can be lost at the same time. This default value corresponds to the maximum I/O size that can be performed efficiently. It occurs when multiblock reads from disk are performed into non-contiguous buffers in the Buffer Cache.1. Oracle introduces an Asynchronous Commit. All rights reserved.as well as on SESSION-LEVEL. Another common I/O related wait event is “control file parallel write'” It occurs when Oracle is writing physical blocks to all controlfiles and is waiting for the IO/s to complete. 38 . For more details about ASMM. To read more about this feature. © Copyright © 2006 Oracle. Such reads are issued for up to the number of blocks specified by this parameter DB_FILE_MULTIBLOCK_READ_COUNT at a time. In cases where such multiblock scans are necessary. Another popular wait event is “log file sync”. there is a need to examine some other wait events such as “LGWR wait for redo copy”. Another common I/O related wait event is “db file scattered read”. I/Os on particular datafiles may be being serviced slower due to excessive activity on their disks. In Oracle Database 10g. Automatic Shared Memory Management (ASMM) feature is introduced to automatically determine the size of Database buffer cache (default pool). please refer to this metalink Note 257643. it is possible to tune the size of multiblock I/Os issued by Oracle by setting the instance parameter DB_FILE_MULTIBLOCK_READ_COUNT to be as below: DB_BLOCK_SIZE x DB_FILE_MULTIBLOCK_READ_COUNT = max_io_size of system Starting with Oracle10g Release 2. Shared pool. “log file parallel write”. The details of this wait is reported in Background Wait Events section. 3.

A snapshot of the database workload taken periodically throughout the day is necessary to detect such performance issues.1 Checkpoint Tuning and Troubleshooting Guide Note 76713. Inc.6 WHAT IS THE DB_FILE_MULTIBLOCK_READ_COUNT PARAMETER? Note 47324. In addition. systems where CPU time is dominant usually need less tuning than the ones where wait time is dominant.1 Understanding and Tuning Buffer Cache and DBWR Note 147468. the proportion of CPU time to WAIT time always tends to decrease as load on the system increases. On the other hand. heavy CPU usage could be caused by poor Sql access paths or badly written SQL so one should not neglect it.1 I/O Tuning with Different RAID Configurations Note 30712. A steep increase in wait times is a sign of contention and need to be addressed for good scalability. Below is a list of metalink reference notes that can useful for database tuning.1 Init. 39 . All rights reserved.1 Multiple Buffer Pools © Copyright © 2006 Oracle.1 Init.1 Archiver Best Practices Note 62172.7/27/2011 PeopleSoft Red Paper As a general rule. Note 190124.ora Parameter "DB_FILE_DIRECT_IO_COUNT" Reference Note Note 45042.1 8i Parameters that Influence Checkpoints Note 76374.ora Parameter "DB_FILE_MULTIBLOCK_READ_COUNT" Reference Note Note 1037322.1 THE COE PERFORMANCE METHOD Note 30286.

**/ /** ** Flush Monitoring info ** ** This forces the database to "flush" the modification data ** so that dbms_stats can tell whether the stats are stale. SET SERVEROUTPUT ON SIZE UNLIMITED SET LINESIZE 1000 SET PAGESIZE 10000 /** ** Oracle USA. BOOLEAN. ** ** Please note: ** For this script to function properly. NUMBER(2. lts_StartTime TIMESTAMP(2). Inc. the executing user ** may need the DBA role. © Copyright © 2006 Oracle. ** Date: 16-Jan-2007 ** ** Format: SQL*Plus (10g) DBA script. This script directly accesses: ** DBA_INDEXES ** DBMS_STATS ** All the table/index objects within all the schemas in the database. **/ DECLARE lot_ObjectsNeedingStats dbms_stats. VARCHAR2(30).7/27/2011 PeopleSoft Red Paper Appendix A – Sample script to gather statistics on tables The script is written based on the assumption that a PS temp table is defined in PSRECDEFN as having a rectype=7 and PS regular table is defined as having a rectype =0. VARCHAR2(30). All rights reserved. lvc_tableowner lvc_tablename lvc_PSRecordName lint_tmp lb_IsTempTable sql_stmt VARCHAR2(30).objecttab. BEGIN /** ** Delete Old Status Info here ** ** If an external table is used to hold the log ** of the executions. It may require changes and modifications to suit your need. ** ** Purpose: ** To generate statistics on all non-system schema table and index objects ** that are considered by the database to be stale and/or missing. 40 .0). ** ** Other rights may also be needed. while not ** generating statistics for PeopleSoft "temporary" tables and indexes. lts_FinishTime TIMESTAMP(2). VARCHAR2(2000). truncate it here. It then will generate the appropriate update statistics command for regular table and indexes while skipping PS temp tables and indexes. Inc.

FLUSH_DATABASE_MONITORING_INFO.'DBSNMP' ) THEN /** ** Non System object ** ** Determine whether this object is an "INDEX" or "TABLE" **/ IF lot_ObjectsNeedingStats( i ). FOR i IN NVL( lot_ObjectsNeedingStats.table_name INTO lvc_tableowner . /** Object Type checking **/ /** ** Trim off the default "PS_" from the table name if it exists **/ IF SUBSTR( lvc_tablename. ELSE lvc_tableowner := lot_ObjectsNeedingStats( i ).options => 'LIST AUTO' . 0 ) . NVL( lot_ObjectsNeedingStats. lvc_tablename := lot_ObjectsNeedingStats( i ). ** ** Example Table name = PS_TEMP_TAO **/ BEGIN EXECUTE IMMEDIATE sql_stmt INTO lint_tmp © Copyright © 2006 Oracle.objname.first..ownname NOT IN ( 'SYS' .PSRECDEFN WHERE recname = :b1 and rectype = 7'. /** ** Check to see if the record ** is a base temp table. END IF. **/ DBMS_STATS.ownname. END IF.objname. Doing it just in case. 1. Inc.objtype = 'INDEX' THEN SELECT table_owner . ELSE lvc_PSRecordName := lvc_tablename.lvc_tablename FROM dba_indexes WHERE 1 = 1 AND owner = lot_ObjectsNeedingStats( i ).objlist => lot_ObjectsNeedingStats ). 4 ).GATHER_DATABASE_STATS ( cascade => TRUE .last. 3 ) = 'PS_' THEN lvc_PSRecordName := SUBSTR( lvc_tablename. 41 . All rights reserved.'CTXSYS' . PeopleSoft Red Paper /** ** Find all tables and indexes that have stale stats **/ DBMS_STATS. /** Strip "PS_" **/ /** Set the temp table trap **/ lb_IsTempTable := FALSE.7/27/2011 ** Documentation says this is not needed.ownname AND index_name = lot_ObjectsNeedingStats( i ).'SYSMAN' . 0 ) LOOP /** ** Filter out all the system objects **/ IF lot_ObjectsNeedingStats( i ). /** rectype = 7 denotes a PeopleSoft temp table **/ sql_stmt := 'SELECT 1 FROM ' || lvc_tableowner || '.'SYSTEM' .

END. 1. 1 ) BETWEEN '1' AND '9' THEN /** Remove the 2nd to last digit **/ lvc_PSRecordName := SUBSTR( lvc_PSRecordName.If we make it here. LENGTH( lvc_PSRecordName ) . -. 42 . we found a record lb_IsTempTable := TRUE.If we make it here. WHEN OTHERS THEN RAISE. we found a record lb_IsTempTable := TRUE. LENGTH( lvc_PSRecordName ) .We have not found a temp table! NULL. 1 ) BETWEEN '0' AND '9' THEN /** Remove the last digit **/ lvc_PSRecordName := SUBSTR( lvc_PSRecordName. PeopleSoft Red Paper EXCEPTION WHEN NO_DATA_FOUND THEN /** ** Record was not a base temp table ** ** Check if record is a single digit temp instance ** ** Example Table name = PS_TEMP_TAO1 **/ IF SUBSTR( lvc_PSRecordName. LENGTH( lvc_PSRecordName ). All rights reserved. ** ** Check if record is a double digit temp instance ** ** Example Table name = PS_TEMP_TAO26 **/ IF SUBSTR( lvc_PSRecordName. we found a record lb_IsTempTable := TRUE.1 ).If we make it here. EXCEPTION WHEN NO_DATA_FOUND THEN /** ** Record was not a single digit temp instance. /** Check 2nd last char for digit **/ WHEN OTHERS THEN RAISE. LENGTH( lvc_PSRecordName ). END. /** 2 digit dedicated temp table Check **/ END IF. -. EXCEPTION WHEN NO_DATA_FOUND THEN -. Inc. -. 1. /** ** Do the Check **/ BEGIN EXECUTE IMMEDIATE sql_stmt INTO lint_tmp USING lvc_PSRecordName. /** single digit dedicated temp table Check **/ © Copyright © 2006 Oracle.1 ). /** ** Do the Check **/ BEGIN EXECUTE IMMEDIATE sql_stmt INTO lint_tmp USING lvc_PSRecordName.7/27/2011 USING lvc_PSRecordName.

' ). ELSE /* PROCEDURE GATHER_TABLE_STATS Argument Name Type In/Out Default? -----------------------------. ELSE /** Unexpected error **/ RAISE.ownname || '.estimate_percent => DBMS_STATS.----------------------. ** Generate Stats **/ NULL. END IF.AUTO_DEGREE ). /** base temp table check**/ IF lb_IsTempTable = FALSE THEN lts_StartTime := SYSTIMESTAMP.-------OWNNAME VARCHAR2 IN TABNAME VARCHAR2 IN PARTNAME VARCHAR2 IN DEFAULT ESTIMATE_PERCENT NUMBER IN DEFAULT BLOCK_SAMPLE BOOLEAN IN DEFAULT METHOD_OPT VARCHAR2 IN DEFAULT DEGREE NUMBER IN DEFAULT GRANULARITY VARCHAR2 IN DEFAULT CASCADE BOOLEAN IN DEFAULT STATTAB VARCHAR2 IN DEFAULT STATID VARCHAR2 IN DEFAULT STATOWN VARCHAR2 IN DEFAULT © Copyright © 2006 Oracle.objtype ) || ' ' || lot_ObjectsNeedingStats( i ).-----. IF lot_ObjectsNeedingStats( i ).ownname || ''' .----------------------.7/27/2011 PeopleSoft Red Paper END IF.-------OWNNAME VARCHAR2 IN INDNAME VARCHAR2 IN PARTNAME VARCHAR2 IN DEFAULT ESTIMATE_PERCENT NUMBER IN DEFAULT STATTAB VARCHAR2 IN DEFAULT STATID VARCHAR2 IN DEFAULT STATOWN VARCHAR2 IN DEFAULT DEGREE NUMBER IN DEFAULT GRANULARITY VARCHAR2 IN DEFAULT NO_INVALIDATE BOOLEAN IN DEFAULT STATTYPE VARCHAR2 IN DEFAULT FORCE BOOLEAN IN DEFAULT */ EXECUTE IMMEDIATE ' BEGIN DBMS_STATS. /** Checking last digit **/ WHEN OTHERS THEN IF SQLCODE = -942 THEN /** table or view does not exist **/ /** Non PeopleSoft Table/Index found. END.objtype = 'INDEX' THEN /* PROCEDURE GATHER_INDEX_STATS Argument Name Type In/Out Default? -----------------------------. '.indname => ''' || lot_ObjectsNeedingStats( i ).' || lot_ObjectsNeedingStats( i ).put_line( 'Generating stats on ' || LOWER( lot_ObjectsNeedingStats( i ).degree => DBMS_STATS. ** Treat as though it was not a temp table.objname || ''' .partname => ''' || lot_ObjectsNeedingStats( i ).GATHER_INDEX_STATS( ownname => ''' || lot_ObjectsNeedingStats( i ). All rights reserved. dbms_output.objname || '. END.partname || ''' .AUTO_SAMPLE_SIZE . Inc.-----. 43 .

GATHER_TABLE_STATS( ownname => ''' || lot_ObjectsNeedingStats( i ). lts_FinishTime := SYSTIMESTAMP. '.ownname || ''' . /** Gen Stats **/ /** ** Insert status info ** ** If so inclined ** COMMIT. END IF.' || lot_ObjectsNeedingStats( i ).put_line( 'NOT Generating stats on temp ' || LOWER( lot_ObjectsNeedingStats( i ).partname => ''' || lot_ObjectsNeedingStats( i ).estimate_percent => DBMS_STATS.cascade => FALSE ).objname || '.degree => DBMS_STATS. **/ END IF.ownname || '. END. / © Copyright © 2006 Oracle. **/ ELSE dbms_output.tabname => ''' || lot_ObjectsNeedingStats( i ).AUTO_SAMPLE_SIZE . /** Object stale stats loop **/ END. ** ** If so inclined. Inc.method_opt => ''FOR ALL COLUMNS SIZE AUTO'' .objname || ''' .objtype ) || ' ' || lot_ObjectsNeedingStats( i ). /** ** Create status string here.7/27/2011 NO_INVALIDATE STATTYPE FORCE */ BOOLEAN VARCHAR2 BOOLEAN IN IN IN DEFAULT DEFAULT DEFAULT PeopleSoft Red Paper EXECUTE IMMEDIATE ' BEGIN DBMS_STATS. All rights reserved.AUTO_DEGREE . END IF. 44 . /** System object filter **/ END LOOP.partname || ''' .' ).block_sample => FALSE .

© Copyright © 2006 Oracle. All rights reserved. FIELD VALIDATION PeopleSoft Consulting has provided feedback and validation on this document. Inc.7/27/2011 PeopleSoft Red Paper Appendix B – Validation and Feedback This section documents that real-world validation that this Red Paper has received. Lessons learned from these customer experiences will be posted here. 45 . CUSTOMER VALIDATION PeopleSoft is working with PeopleSoft customers to get feedback and validation on this document. Additional lessons learned from field experience will be posted here.

com/oramag/ 3. 46 .Oracle Tuning chapter 2. http://metalink. Peoplesoft Installation Guide .References 1.com © Copyright © 2006 Oracle.oracle. http://www.oracle.7/27/2011 PeopleSoft Red Paper Appendix C . Inc. All rights reserved.

and developer. Worked on SCM application tuning and benchmarks in Performance & Benchmarks group. development DBA. Inc. and 12 years of Oracle database experience.7/27/2011 PeopleSoft Red Paper Appendix D – Revision History Authors Jayagopal Theranikal. systems engineer. All rights reserved. Rama Tiruveedhula. Glenn Low. Principal Performance Engineer 15 years of Oracle database experience as a production DBA. 2+ years experience with PeopleSoft applications tuning. 02/29/2007: Peoplesoft Enterpise Performance on Oracle 10g Database Jan 2007 Author: Jayagopal Theranikal Contributing Authors: Rama Tiruveedhula © Copyright © 2006 Oracle. 2. Worked on Fusion/Enterprise applications architecture within Performance & Benchmarks group. 47 . 02/01/2007: Created document. Principal Performance Engineer Lawrence Schapker. Principal Performance Engineer Reviewers The following people reviewed this Red Paper: • • • Revision History 1. Senior Manager. Consulting Performance Engineer 10+ years of experience with PeopleSoft applications tuning. Worked on SCM applications tuning within Performance & Benchmarks group. Michelle Lam. Application Performance Having more than 15 years of Oracle database experience and more than 6 years of Peoplesoft Application tuning experience.

Oracle. This document is not warranted to be error-free. Inc. © Copyright © 2006 Oracle. CA 94065 U.7200 oracle. and Siebel are registered trademarks of Oracle Corporation and/or its affiliates.S. All rights reserved.506. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. JD Edwards. Oracle. 48 . PeopleSoft.650.com Copyright © 2006. PeopleSoft Red Paper Worldwide Inquiries: Phone: +1.506. including implied warranties and conditions of merchantability or fitness for a particular purpose. nor subject to any other warranties or conditions.7/27/2011 Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores.7000 Fax: +1. This document may not be reproduced or transmitted in any form or by any means. for any purpose.A. electronic or mechanical. whether expressed orally or implied in law. This document is provided for information purposes only and the contents hereof are subject to change without notice. without our prior written permission. Other names may be trademarks of their respective owners. All rights reserved.650.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->