peoplesoft central states rug presentation - nvision tuning
DESCRIPTION
PeopleSoft Central States RUG presentation - nVision TuningTRANSCRIPT
PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Tuning PS/nVision for Optimal Performance
Geoff Bazira
Tools: Enterprise Reporting
Central States Regional Users Group 2nd Quarter Meeting
April, 23rd 10:45 to 11:45
Page 2 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
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 3 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?
Labels Amounts
Process Scheduler
Server Start
Report Book
Report Reqst Scope
Layout
Start
Strings
Get Criteria
Read Metadata
Build SQL
Results
Open
Generate Instance
Issue
Fetch
Create
Instance
Insert Row
s Form
atting B
ulk Copy
Calcs
Inst. Hooks
Instance
Page 4 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Where PS/nVision spends time
Labels Amounts
Process Scheduler
Server Start
Report Book
Report Reqst Scope
Layout
Start
Strings
Get Criteria
Read Metadata
Build SQL
Results
Open
Generate Instance
Issue
Fetch
Deliver
Instance Instance
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..)
• 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 6 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 that’s too granular
• PS/nVision creates and populates instance • Inserting all data
• Contention between concurrent processes • Performing Microsoft® Excel formula calculations • InstanceHooks
Page 7 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 8 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
• Real-time Tracing or Logging
Page 9 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 10 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 11 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 12 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 • Cardinality of column values • Sparsity (Density) of column values • Frequency column is used in WHERE clause • How column is used in WHERE clause
Page 13 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Indexing - PS/nVision Examples
Rule Example of poor choice
Example of good choice
Cardinality of values FISCAL_YEAR ACCOUNT
Sparsity (or lack of sparsity)
BUSINESS_UNIT, PRODUCT
ACCOUNTING_PERIOD
Frequency of Use PRODUCT, PROJECT
ACCOUNT, BUSINESS_UNIT, FISCAL_YEAR, ACCOUNTING_PERIOD
How Used ACCOUNT, DEPTID BUSINESS_UNIT, FISCAL_YEAR
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
• 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 15 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 16 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Tree performance options - Overview
Labels Amounts
Prcs Schdlr
Report Book
Report Reqst Scope
Layout
Start
Get Criteria
Read Metadata
Build SQL
Results
Open
Generate Instance
Exec
Fetch
Deliver
Instance Instance
Build SQL
Tree Selectors Join
Tree Objects
Build Selectors
Page 17 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Tree performance options – Default SQL Join
PSTREESELECTnn L ACCTROLLUP Tree
PS_LEDGER
PSTREESELECTnn L2 DEPARTMENTS Tree
Page 18 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Tree Performance Options - Selector tables
EXPEXPA
1000-1499EXPB
2000-2199
Tree Selector Table (PSTREESELECTnn): Ledger Table:
Sel # Node # From To B. U. LEDGER ACCOUNT … Amount123 1234567 1000 1499 M04 ACTUALS 1000 100.00 123 1234789 2000 2199 M04 ACTUALS …
… M04 ACTUALS 2001 100.00 991 1234789 2001 M04 ACTUALS 2001 100.00 991 1234789 2010 M04 ACTUALS 2010 100.00 991 1234789 2050 M04 ACTUALS 2090 100.00 991 1234789 2090 M04 ACTUALS 2090 100.00 991 1234789 2100 M04 ACTUALS 2090 100.00 991 1234789 2150 M04 ACTUALS 2150 100.00 991 1234789 2180 M04 ACTUALS 2180 100.00
M04 ACTUALS 2180 100.00 M04 ACTUALS …
Static Selector: join using "BETWEEN" or ">= … <="
Dynamic Selector with single values: join using "="
ACCTROLLUP
CASH
ASSETS
Page 19 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 20 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 21 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 22 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Tree performance options – Access Method
• Suppress join • Adds detail values/ranges
to WHERE clause • Efficient for multiple tree
reports • Great with tree in scope
PSTREESELECTnn L1 PS_LEDGER
PSTREESELECTnn L
Literal Values
Page 23 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 24 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 25 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 26 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 27 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Tree Performance Options - selector tables
EXPEXPA
1000-1499EXPB
2000-2199
Tree Selector Table (PSTREESELECTnn): Ledger Table:
Sel # Node # From To B. U. LEDGER ACCOUNT … Amount123 1234567 1000 1499 M04 ACTUALS 1000 100.00 123 1234789 2000 2199 M04 ACTUALS …
… M04 ACTUALS 2001 100.00 991 1234789 2001 M04 ACTUALS 2001 100.00 991 1234789 2010 M04 ACTUALS 2010 100.00 991 1234789 2050 M04 ACTUALS 2090 100.00 991 1234789 2090 M04 ACTUALS 2090 100.00 991 1234789 2100 M04 ACTUALS 2090 100.00 991 1234789 2150 M04 ACTUALS 2150 100.00 991 1234789 2180 M04 ACTUALS 2180 100.00
M04 ACTUALS 2180 100.00 M04 ACTUALS …
Static Selector: join using "BETWEEN" or ">= … <="
Dynamic Selector with single values: join using "="
ACCTROLLUP
CASH
ASSETS
Page 28 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 29 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
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
Page 30 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Summary Ledgers
• Reducing the overall ledger size based on ChartField compression
Ledger 10 Million Rows
Summary Ledger 10 Thousand Rows
Page 31 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/nVision’s “Translate” features
Page 32 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 33 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 • Can’t save because of permissions • Directory specified doesn’t exist • Improperly designed macro’s
• 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 34 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 35 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 36 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 37 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
What’s 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 38 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 39 PeopleSoft Proprietary and Confidential, Copyright 2003 PeopleSoft, Inc. For Internal Use Only, Do not distribute outside of PeopleSoft.
Questions?