You are on page 1of 39

Tuning PS/nVision for Optimal Performance

Geoff Bazira Tools: Enterprise Reporting Central States Regional Users Group 2nd Quarter Meeting April, 23rd
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

10:45 to 11:45

This Session Covers

PS/nVision process flow Where nVision spends its time Where you can make a difference
Environment Layout Indexing for performance Tree performance options Summary ledgers

Summary Q and A
Page 2
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

What Happens when I run an nVision report?


Strings Amounts Labels

Report Report Scope Book Reqst

Fetch

Issue
Read Get Metadata Criteria

Process Scheduler Start Server

Build Results Generate SQL Instance

Insert Rows Inst. Hooks Formatting Calcs Bulk Copy Create

Open

Start

Layout
Page 3
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Instance

Where PS/nVision spends time


Strings Amounts Labels

Report Report Scope Book Reqst

Fetch

Issue
Read Get Metadata Criteria

Process Scheduler Start Server

Build Results Generate SQL Instance

Deliver

Open

Start

Layout
Page 4
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Instance

Where PS/nVision may spend time (cont..)

PSNVS.EXE is started
Starting PeopleTools
Preloading cache Establishing object authorization

Starting Microsoft Excel

PS/nVision Parsing Layout Criteria Digesting Report Scope and Meta Data
Page 5
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Where PS/nVision may spend time (cont..)

PS/nVision issues all SQL statements

Finding the data to be returned


Slow un-tuned SQL Joins with Tree Criteria Joins with Authorization Tables and Trees

Aggregating data thats too granular

PS/nVision creates and populates instance


Inserting all data
Contention between concurrent processes

Performing Microsoft Excel formula calculations InstanceHooks


Page 6
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Where you can make a difference

Environment tuning Layout tips Intelligent indexing Tree performance options Summary ledger
Page 7
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Environment Tuning

Microsoft Excel
Properly installed Files and Macros in the XLStart Folder Outlooks Journal Lines Entry Feature (Excel 97)

Database Server / Batch Server


I/O - Disk Fragmentation Memory CPU

Network
Network Load Optimized NIC

Page 8

Real-time Tracing or Logging

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Layout Tips

Microsoft Excel version of your layout file Distinguish Ad-Hoc Vs Batch type Instancehook macros Selected Detail Values instead of Tree joins Consider not formatting unused cells Pivot Tables performance hogs Have a power user review all layouts

Page 9

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Indexing - overview

Indexes tell the database how to find your data Sequence of fields is important
Determines how much work the database has to do to find a row

Indexes are expensive


Take up valuable disk space Decrease Insert, Delete and Update performance

Page 10

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Indexing Simple Example

Assume following SQL


SELECT FISCAL_YEAR, PERIOD, ACCOUNT FROM LEDGER WHERE FISCAL_YEAR = 2003 AND ACCOUNT = 50050

If table has data for 4 fiscal years and 800 accounts:


Choosing Index on FISCAL_YEAR narrows search by 1/4 Choosing Index on ACCOUNT narrows search by 1/800th

Page 11

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Indexing - Goals
Minimize number of indexes by designing them to cover most SQL statements against that table
Sequence columns used most at beginning of index

Make indexes effective by picking columns that segment the data table well
Sequence effective columns at beginning of index

When picking fields to include in an index, balance the following



Page 12

Cardinality of column values Sparsity (Density) of column values Frequency column is used in WHERE clause How column is used in WHERE clause

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Indexing - PS/nVision Examples


Rule
Cardinality of values Sparsity (or lack of sparsity) Frequency of Use

Example of poor Example of good choice choice


FISCAL_YEAR BUSINESS_UNIT, PRODUCT PRODUCT, PROJECT ACCOUNT ACCOUNTING_PERIOD ACCOUNT, BUSINESS_UNIT, FISCAL_YEAR, ACCOUNTING_PERIOD

How Used

ACCOUNT, DEPTID BUSINESS_UNIT, FISCAL_YEAR

Page 13

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Indexing - Make the most of your optimizer

Optimizer - Brains of RDBMS


Formulates SQL Execution Plan

Two kinds of optimizers


Cost based recommended approach for nVision Rule based

Do you like what your optimizer is giving you?


Look at your SQL
Use SQL Trace Show Report SQL PS/nVision Option

Look at your optimizers Explain Plan


Page 14
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Indexing - Make the most of your optimizer (cont..)

Run Statistics
Poor statistics poor Execution Plan State of tables at time statistics are calculated can have a dramatic affect on performance

Seeding Tables is a way to affect statistics

Page 15

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree performance options - Overview


Amounts Labels
Fetch

Report Report Scope Book Reqst

Tree Selectors

Join

Exec

Prcs Schdlr

Read Get Build Metadata Criteria Selectors

Build Results Generate SQL Instance

Deliver

Open

Start

Tree Objects

Layout
Page 16
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Instance

Tree performance options Default SQL Join

PSTREESELECTnn L
ACCTROLLUP Tree

PS_LEDGER

PSTREESELECTnn L2
DEPARTMENTS Tree

Page 17

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree Performance Options - Selector tables

ACCTROLLUP EXP
EXPA EXPB

ASSETS CASH

1000-1499 2000-2199 Ledger Table: Static Selector: join using "BETWEEN" or ">= <=" B. U. M04 M04 M04 M04 M04 M04 M04 M04 M04 M04 M04 M04 LEDGER ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACCOUNT 1000 2001 2001 2010 2090 2090 2090 2150 2180 2180 Amount 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00

Tree Selector Table (PSTREESELECTnn): Sel # 123 123 991 991 991 991 991 991 991 Node # 1234567 1234789 1234789 1234789 1234789 1234789 1234789 1234789 1234789 From 1000 2000 2001 2010 2050 2090 2100 2150 2180 To 1499 2199

Dynamic Selector with single values: join using "="

Page 18

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree Perf. Options Default SQL statement


SELECT A.ACCOUNT, A.DEPTID, SUM(A.POSTED_TOTAL_AMT) FROM PS_LEDGER A, PSTREESELECT10 L, PSTREESELECT10 L1 WHERE A.LEDGER='LOCAL' AND A.FISCAL_YEAR=1995 AND A.ACCOUNTING_PERIOD BETWEEN 1 AND 12 AND A.BUSINESS_UNIT='US001' AND L.SELECTOR_NUM=215 AND A.ACCOUNT>= L.RANGE_FROM_10 AND A.ACCOUNT <= L.RANGE_TO_10 AND L.TREE_NODE_NUM BETWEEN 101694916 AND 305084745 AND L1.SELECTOR_NUM=214 AND A.DEPTID>= L1.RANGE_FROM_10 AND A.DEPTID <= L1.RANGE_TO_10 AND L1.TREE_NODE_NUM BETWEEN 1 AND 2000000000 AND A.CURRENCY_CD='USD' AND A.STATISTICS_CODE=' ' GROUP BY A.ACCOUNT, A.DEPTID
Page 19
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree performance options

Provide ability to tune SQL


Tree criteria may cause time consuming joins

Customer controlled
Settings for each tree Defaults in Tree Manager Overrides in PS/nVision layout

Permit fine tuning of production critical reports


Page 20
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree performance options


Control Whether staging is done Suppress Join Control Persistence of Selectors Static Dynamic Control How Selectors are Populated Single Values Ranges Control Syntax of Join for Ranges Between <=, >=

Page 21

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree performance options Access Method

PSTREESELECTnn L1

PS_LEDGER

Suppress join
Adds detail values/ranges to WHERE clause Efficient for multiple tree reports Great with tree in scope

Literal Values

PSTREESELECTnn L

Page 22

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree Performance Options - Suppress Join


SELECT A.ACCOUNT, A.DEPTID, SUM(A.POSTED_TOTAL_AMT) FROM PS_LEDGER A, PSTREESELECT10 L WHERE A.LEDGER='LOCAL' AND A.FISCAL_YEAR=1995 AND A.ACCOUNTING_PERIOD BETWEEN 1 AND 12 AND A.BUSINESS_UNIT='US001' AND L.SELECTOR_NUM=215 AND A.ACCOUNT>= L.RANGE_FROM_10 AND A.ACCOUNT <= L.RANGE_TO_10 AND L.TREE_NODE_NUM BETWEEN 101694916 AND 305084745 AND (A.DEPTID BETWEEN '10000' AND '10999' OR A.DEPTID BETWEEN '11000' AND '11999' OR A.DEPTID BETWEEN '12000' AND '12999' OR A.DEPTID BETWEEN '64000' AND '64999') AND A.CURRENCY_CD='USD' AND A.STATISTICS_CODE=' ' GROUP BY A.ACCOUNT, A.DEPTID
Page 23
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree performance options - Tree Selectors

Static selectors - (default method)


Selector exists until tree changes

Dynamic selectors
Selector built for this report Contains only required part of tree Enables more streamlined join

Page 24

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree Perf. Options Dynamic Selector Example


SELECT A.ACCOUNT, A.DEPTID, SUM(A.POSTED_TOTAL_AMT) FROM PS_LEDGER A, PSTREESELECT10 L, PSTREESELECT10 L1 WHERE A.LEDGER='LOCAL' AND A.FISCAL_YEAR=1995 AND A.ACCOUNTING_PERIOD BETWEEN 1 AND 12 AND A.BUSINESS_UNIT='US001' AND L.SELECTOR_NUM=215 AND A.ACCOUNT>= L.RANGE_FROM_10 AND A.ACCOUNT <= L.RANGE_TO_10 AND L.TREE_NODE_NUM BETWEEN 101694916 AND 305084745 AND L1.SELECTOR_NUM=224 AND A.DEPTID>= L1.RANGE_FROM_10 AND A.DEPTID <= L1.RANGE_TO_10 AND A.CURRENCY_CD='USD' AND A.STATISTICS_CODE=' ' GROUP BY A.ACCOUNT, A.DEPTID

Page 25

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree Perf. Options Dynamic Selector Options

Ranges of values
Control over join syntax BETWEEN is best on most platforms

Single value selector


Usually most efficient: equi-join Builds selector from detail table Can take longer to build selector Ideal for multiple instances
Page 26
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree Performance Options - selector tables

ACCTROLLUP EXP
EXPA EXPB

ASSETS CASH

1000-1499 2000-2199 Ledger Table: Static Selector: join using "BETWEEN" or ">= <=" B. U. M04 M04 M04 M04 M04 M04 M04 M04 M04 M04 M04 M04 LEDGER ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACTUALS ACCOUNT 1000 2001 2001 2010 2090 2090 2090 2150 2180 2180 Amount 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00

Tree Selector Table (PSTREESELECTnn): Sel # 123 123 991 991 991 991 991 991 991 Node # 1234567 1234789 1234789 1234789 1234789 1234789 1234789 1234789 1234789 From 1000 2000 2001 2010 2050 2090 2100 2150 2180 To 1499 2199

Dynamic Selector with single values: join using "="

Page 27

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Example - Dynamic Selector with Single Values set on Departments Table


SELECT A.ACCOUNT, A.DEPTID, SUM(A.POSTED_TOTAL_AMT) FROM PS_LEDGER A, PSTREESELECT10 L, PSTREESELECT10 L1 WHERE A.LEDGER='LOCAL' AND A.FISCAL_YEAR=1995 AND A.ACCOUNTING_PERIOD BETWEEN 1 AND 12 AND A.BUSINESS_UNIT='US001' AND L.SELECTOR_NUM=215 AND A.ACCOUNT>= L.RANGE_FROM_10 AND A.ACCOUNT <= L.RANGE_TO_10 AND L.TREE_NODE_NUM BETWEEN 101694916 AND 305084745 AND L1.SELECTOR_NUM=225 AND A.DEPTID=L1.RANGE_FROM_10 AND A.CURRENCY_CD='USD' AND A.STATISTICS_CODE=' ' GROUP BY A.ACCOUNT, A.DEPTID

Page 28

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Tree Perf. Options Default SQL statement


DEFAULT:
SELECT A.ACCOUNT, A.DEPTID, SUM(A.POSTED_TOTAL_AMT) FROM PS_LEDGER A, PSTREESELECT10 L, PSTREESELECT10 L1 WHERE A.LEDGER='LOCAL' AND A.FISCAL_YEAR=1995 AND A.ACCOUNTING_PERIOD BETWEEN 1 AND 12 AND A.BUSINESS_UNIT='US001' AND L.SELECTOR_NUM=215 AND A.ACCOUNT>= L.RANGE_FROM_10 AND A.ACCOUNT <= L.RANGE_TO_10 AND ( L.TREE_NODE_NUM BETWEEN 101694916 AND 305084745 OR L.TREE_NODE_NUM BETWEEN 401694916 AND 505084745 OR L.TREE_NODE_NUM BETWEEN 501694916 AND 605084745 .) AND L1.SELECTOR_NUM=214 AND A.DEPTID>= L1.RANGE_FROM_10 AND A.DEPTID <= L1.RANGE_TO_10 AND (L1.TREE_NODE_NUM BETWEEN 1 AND 2000000000 OR L1.TREE_NODE_NUM BETWEEN 2000000000 AND 3000000000 OR L1.TREE_NODE_NUM BETWEEN 3000000000 AND 4000000000 ..) AND A.CURRENCY_CD='USD' AND A.STATISTICS_CODE=' ' GROUP BY A.ACCOUNT, A.DEPTID
Page 29
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

DYNAMIC SELECTOR with SINGLE VALUES: SELECT A.ACCOUNT, A.DEPTID, SUM(A.POSTED_TOTAL_AMT) FROM PS_LEDGER A, PSTREESELECT10 L, PSTREESELECT10 L1 WHERE A.LEDGER='LOCAL' AND A.FISCAL_YEAR=1995 AND A.ACCOUNTING_PERIOD BETWEEN 1 AND 12 AND A.BUSINESS_UNIT='US001' AND L.SELECTOR_NUM=215 AND A.ACCOUNT>= L.RANGE_FROM_10 AND A.ACCOUNT <= L.RANGE_TO_10 AND L.TREE_NODE_NUM BETWEEN 101694916 AND 305084745 AND L1.SELECTOR_NUM=214 AND A.DEPTID>= L1.RANGE_FROM_10 AND A.CURRENCY_CD='USD' AND A.STATISTICS_CODE=' ' GROUP BY A.ACCOUNT, A.DEPTID

Summary Ledgers

Reducing the overall ledger size based on ChartField compression

Ledger 10 Million Rows

Summary Ledger 10 Thousand Rows

Page 30

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Summary Ledgers

Maximizing compression
Reduce number of ChartFields Consider using a summary calendar to map periods into quarters or even year-to-date Roll up one or more ChartFields using trees - store node names in Summary Ledger Review PS/nVisions Translate features

Page 31

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Other Performance considerations


Deleting orphaned rows from Selectors Purging Tree Selectors (with caution) Rebuild of Selectors when you modify size of a ChartField Number of Tree levels does not affect performance Trade-off between elaborate security and performance
For example - Authorizations using a tree not encouraged when accessing high volume data

Run subset of reports to pre-load cache Limit number of concurrent PS/nVision instances to 5 or 6 per batch server
Page 32
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Other Performance considerations (cont..)


SCODE errors
Symptoms of MS Excel complaining e.g. Invalid file name Cant save because of permissions Directory specified doesnt exist Improperly designed macros

PS/nVision exits without completion


nVision may be trying to generate two reports concurrently with the same name use %RID%

PS/nVision stays in initiated state


Check psprcs.cfg file to make sure instance directory is well qualified Sometimes using UNC path is better

Page 33

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

When should we tune?

Critical to consistently measure performance of large reports or large batch jobs Weigh the cost of reporting time Vs Size of reports

Page 34

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Recommended Approach

Power User and DBA partnership to coordinate


Review of layouts before they get to production Reporting needs and Data distribution Indexing PS/nVision tree performance options Running statistics

Find out what performance monitoring tools your RDBMS provides Review the nVision Red Paper
Page 35
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Summary

nVision process flow Where we spend time Where we can make a difference Tools to help us Action plan
Page 36
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Whats new in PS/nVision 8.44

Extra logging capability that shows functions executed Can restart Report Requests and Reportbooks Can set time limits for PS/nVision processes Microsoft Excel concurrency issues minimized Report books and Requests can be secured as Public or Private

Page 37

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Where to find more information

PeopleBooks PS/nVision Red Paper Customer Connection(www.peoplesoft.com)


PS/nVision performance tuning document

Global Support Center

Page 38

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

Questions?

Page 39

PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.

You might also like