SlideShare a Scribd company logo
PeopleTools 8.54
for the Oracle DBA
David Kurtz
Go-Faster Consultancy Ltd.
david.kurtz@go-faster.co.uk
www.go-faster.co.uk
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 2
• Oracle Database Specialist
• PeopleSoft
– Independent consultant
• Performance tuning
– PeopleSoft ERP
– Oracle RDBMS
• Book
– www.psftdba.com
• Oak Table
• .
Who Am I?
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 3
Resources
• The presentation is available from
• http://www.go-faster.co.uk
• It started out as a series of blog postings
– http://blog.psftdba.com/2015/02/peopletools-85
4-for-oracle-dba.html
– http://blog.psftdba.com/search/label/PeopleTool
s 8.54
Agenda
• There is lots of new stuff in PeopleTools
8.54.
– Fluid UI
– Graphical Reporting
– Upgrade & Configuration management
– Security enhancements
• This presentation looks at support for
Oracle database performance features
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 4
Agenda
• Descending Key Indexes
• Materialised Views
• Global Temporary Tables
• Partitioning
• %SQLHint Meta-SQL
• %SelectDummyTable Meta-SQL
• Multiple Security Records
• Oracle Resource Manager
• Performance Monitor enhancements
• EnableAEMonitoring
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 5
Descending Indexes
• They have gone again!
– Originally, descending fields → descending
columns in key indexes
– PT8.14 ascending indexes due to bug in Oracle 8i
– PT8.48 descending indexes reinstated. First
version not certified below Oracle 9i
– PT8.54 only ascending indexes built. Including
user indexes.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 6
Does it matter?
• Index leaf nodes are chained in both
directions.
– So a descending index can be used for an
ascending scan and vice versa
• Min/max range scan optimisation
– Doesn’t work with descending indexes
– Ascending index can be slightly better
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 7
Ascending Scan Descending Index
WHERE name <=‘Clark’
• Descending indexes use sys_op_descend()
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 8
Ward
Smith
Martin
Jones
Ford
Allen
Turner
King
Ward
Turner
Smith
Scott
Miller
Ford
Clark
Blake
Jones
James
Allen
Adams
Martin
King
Ascending Index Scan
WHERE name <=‘Clark’
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 9
Adams
King
Adams
Blake
James
King
Miller
Turner
Adams
Allen
Blake
Clark
Ford
James
Jones
Turner
Ward
Miller
Scott
Smith
King
Martin
Descending Scan Ascending Index
WHERE name <=‘Clark’
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 10
Adams
King
Adams
Blake
James
King
Miller
Turner
Adams
Allen
Blake
Clark
Ford
James
Jones
Turner
Ward
Miller
Scott
Smith
King
Martin
• /*+INDEX_DESC()*/ hint
Limitations of Descending
Indexes
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 12
• Implemented in Oracle as function based
indexes
– Use sys_op_descend()
• A unique function-based index cannot be
used to support a primary key.
• Some things need a primary key, not just a
unique index.
Requirements of Primary Keys
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 13
• All columns in primary key must be non-
nullable
– In PeopleSoft
• All character and numeric columns are non-nullable
• Required dates are non-nullable
• Cannot index CLOB/BLOB columns
• Only leaves non-required dates.
Non-nullable unique index
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 14
• Primary key
– PK based replication of materialised views
• (more about this later)
– Star Schema transformations
– Reference partition
• Logical standby
– Doesn’t actually need primary keys
– Does need index to uniquely identify rows.
– Otherwise generates supplementary logging
Primary Keys
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 15
• Normal unique indexes on only non-
nullable columns can support primary keys
create unique index t2 on t(b);
alter table t add constraint PK_ON_FUNC
primary key (b) using index t2;
Upgrade considerations
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 16
• Lots of descending indexes,
– mostly on EFFDT
• Suggestion
– Pave the way for the upgrade
– Set Oracle initialisation parameter to prevent
creation of descending index
• _IGNORE_DESC_IN_INDEX = TRUE
Conclusion
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 17
• Replacement of descending indexes
– should produce small improvement
• especially to effective-date/sequence sub-queries
– Opens opportunity to use other Oracle features
– Why wait for PT8.54?
Materialised Views
• Snapshots introduced in Oracle7
• Renamed Materialized Views in Oracle 8i
– Table that contains results of a query
– Hidden triggers to maintain MV logs
– Oracle supplied package
• DBMS_MVIEW to maintain them
• DBMS_REFRESH
– Incremental refresh of single table MV
• Primary Key –or- ROWID
– Complete refresh of complex MV
– Populate on creation or later
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 18
Why Materialise a View?
• Performance advantages over accessing
underlying data directly
– latency
• Reduction in I/O, mostly physical
– Different database
– Subset of rows
– Subset of columns
– Different indexing
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 19
Materialised Views in PT8.54
• PeopleSoft Documentation:
– Data Management, Using Materialized Views
• New PeopleTools tables
– PSPTMATVWDEFN
• addition definition fields for the MV, build, refresh, staleness, stats.
• Doesn't contain the query, that is in PSSQLTEXTDEFN as it is for
all other views.
– PSPTMATVWDEP
• lists tables upon which MV depends.
• PeopleSoft seems to work this out for itself by parsing the SQL
query.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 20
Example 1: Replicate part of
JOB
• Subset of columns
• Across a database link from another
database.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 21
Example 1: Replicate part of
JOB
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 22
MV Design – Thought required
• Refresh method
– Complete – mandatory for complex views
– Fast – single table only, probably across DB link
• Refresh mode
– On commit: could affect DML on source table
– On demand: manually issued refresh at specific
point
– Scheduled: database job
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 23
Build Script: MV doesn’t exist (1)
DROP VIEW PS_DMK
/
CREATE VIEW PS_DMK
(EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT,
DEPTID)
AS SELECT EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT ,
DEPTID
FROM PS_JOB@HROTHER
/
UPDATE PSPTMATVWDEFN
SET PTMAT_MATSTAT = 0, PTMAT_REFRESHSTAT = 0,
PTMAT_LASTREFRESH = TO_TIMESTAMP('1900-01-01-00.00.00.000000'
,'YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE'
WHERE RECNAME = 'DMK'
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 24
Build Script: MV doesn’t exist (2)
DELETE FROM MV_CAPABILITIES_TABLE WHERE MVNAME = 'PS_DMK'
/
DROP VIEW PS_DMK
/
CREATE MATERIALIZED VIEW PS_DMK
(EMPLID, EMPL_RCD, EFFDT, EFFSEQ,
SETID_DEPT, DEPTID)
TABLESPACE PSMATVW
BUILD DEFERRED REFRESH FAST ON DEMAND
DISABLE QUERY REWRITE
AS SELECT EMPLID , EMPL_RCD , EFFDT ,
EFFSEQ , SETID_DEPT , DEPTID FROM PS_JOB@HROTHER
/
UPDATE PSPTMATVWDEFN
SET PTMAT_MATSTAT = 1, PTMAT_REFRESHSTAT = 0,
PTMAT_LASTREFRESH = TO_TIMESTAMP('1900-01-01-00.00.00.000000'
,'YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE'
WHERE RECNAME = 'DMK'
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 25
Build Script: MV exists
DROP MATERIALIZED VIEW PS_DMK
/
UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 0, PTMAT_REFRESHSTAT = 0, PTMAT_LASTREFRESH = TO_TIMESTAMP('1900-
01-01-00.00.00.000000','YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE'
WHERE RECNAME = 'DMK'
/
CREATE VIEW PS_DMK (EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID) AS
SELECT EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT , DEPTID FROM PS_JOB@HROTHER
/
UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 0, PTMAT_REFRESHSTAT = 0, PTMAT_LASTREFRESH = TO_TIMESTAMP('1900-
01-01-00.00.00.000000','YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE'
WHERE RECNAME = 'DMK'
/
DELETE FROM MV_CAPABILITIES_TABLE WHERE MVNAME = 'PS_DMK'
/
DROP VIEW PS_DMK
/
CREATE MATERIALIZED VIEW PS_DMK (EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID)
TABLESPACE PSMATVW BUILD IMMEDIATE REFRESH FAST ON DEMAND DISABLE QUERY REWRITE AS
SELECT EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT , DEPTID FROM PS_JOB@HROTHER
/
UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 1, PTMAT_REFRESHSTAT = 1,
(PTMAT_LASTREFRESH, PTMAT_STALENESS) = (SELECT LAST_REFRESH_DATE,
STALENESS FROM USER_MVIEWS WHERE MVIEW_NAME = 'PS_DMK') WHERE RECNAME = 'DMK'
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 26
Must have primary key on source
table
• Application Desigenr can only build primary key
based MVs.
• If source table doesn’t have primary
ORA-12014: table 'PS_JOB' does not contain a primary key
constraint
– Because on remote database.
– If PT 8.48-8.53 then it may have a descending index!
• You have to handle this manually
– Create materialised view log manually too.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 27
Indexing MVs
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 28
• Cannot specify indexes
Indexing MVs
• Primary key automatically inherited on
single table MV replicated by MV
• Alternate search columns on MV not
indexed
– Must handle indexes on MV manually
• Cannot define user indexes on MV
– Might be necessary because querying MV
differently to base table.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 29
Example 2: Replicate part of
PS_JOB locally
• Create primary key on source table
• Create materialised view log on source table
• But
– Build script repeatedly rebuilds MV log and MV
• Could be a problem for large MV
– Generated build script alternated between dropping
and building MV
• You don’t know if the build script is going to do the
right thing! – clearly a bug.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 31
MV Log created with additional
columns
CREATE MATERIALIZED VIEW LOG
ON PS_JOB
TABLESPACE PSMATVW
WITH PRIMARY KEY
, ROWID
, SEQUENCE(DEPTID, SETID_DEPT)
INCLUDING NEW VALUES
PURGE IMMEDIATE
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 32
MV Log created with additional
columns
SQL> desc mlog$_ps_job
Name Null? Type
----------------------------- -------- -------------------
EFFDT DATE
EFFSEQ NUMBER
EMPLID VARCHAR2(11 CHAR)
EMPL_RCD NUMBER
DEPTID VARCHAR2(10 CHAR)
SETID_DEPT VARCHAR2(5 CHAR)
M_ROW$$ VARCHAR2(255 CHAR)
SEQUENCE$$ NUMBER
SNAPTIME$$ DATE
DMLTYPE$$ VARCHAR2(1 CHAR)
OLD_NEW$$ VARCHAR2(1 CHAR)
CHANGE_VECTOR$$ RAW(255)
XID$$ NUMBER
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 33
MVs in Application Designer are more like
Views than Tables!
• MV and MV logs always built in tablespace
PSMATVW
– I can’t find a way to control!
– I would put logs in separate tablespace to MVs
• No storage clause on Materialised View
– Cannot control space allocation in block
• Need attributes of a table as well as of a view
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 34
Example 3: MV of Security View
• PS_SJT_DEPT not added
to PSPTMATVWDEP
– Because has duplicate key
SELECT …
FROM PS_DEPT_TBL DEPT
, PSOPRDEFN OPR
WHERE EXISTS (
SELECT 'X'
FROM PS_SJT_DEPT SEC
, PS_SJT_CLASS_ALL CLS
, PS_SJT_OPR_CLS SOC
…)
OR EXISTS (
SELECT 'X'
FROM PS_SJT_DEPT SEC
, PS_SJT_CLASS_ALL CLS
, PS_SJT_OPR_CLS SOC
…)
OR EXISTS (
SELECT 'X'
FROM PS_SJT_DEPT SEC
, PS_SJT_CLASS_ALL CLS
, PS_SJT_OPR_CLS SOC
…)
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 35
Example 3: PK validation?
ALTER TABLE PS_SJT_DEPT ADD CONSTRAINT
PS_SJT_DEPT_PK PRIMARY KEY (SCRTY_KEY1, SCRTY_KEY2,
SCRTY_KEY3, SCRTY_TYPE_CD, SETID)
Error: DMK_DPT_SEC_MVW - SQL Error. Error Position:
39 Return: 2437 - ORA-02437: cannot validate
(SYSADM.PS_SJT_DEPT_PK) - primary key violated
• Application Designer worked out that PS_SJT_DEPT was referenced by
the MV
• But it didn’t realise that it didn’t have a unique key that could be turned
into a primary key.
• The error was produced because we did have duplicate data.
• Complex MV doesn’t need PK on source tables for complete refresh.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 36
MV_CAPABILITIES_TABLE
• This produces error during script
generation!
EXECUTE DBMS_MVIEW.EXPLAIN_MVIEW (q'[CREATE MATERIALIZED VIEW
PS_DMK_DPT_SEC_MVW (SETID, OPRID, DEPTID, DESCR, DESCRSHORT,
SETID_LOCATION, LOCATION, MANAGER_ID, COMPANY, USE_BUDGETS,
USE_ENCUMBRANCES) TABLESPACE PSMATVW BUILD DEFERRED REFRESH
FAST ON DEMAND AS
SELECT DEPT.SETID, OPR.OPRID, DEPT.DEPTID , DEPT.DESCR , DEPT.DESCRSHORT ,
DEPT.SETID_LOCATION , DEPT.LOCATION , DEPT.MANAGER_ID , DEPT.COMPANY ,
DEPT.USE_BUDGETS , DEPT.USE_ENCUMBRANCES FROM PS_DEPT_TBL DEPT , PSOPRDEFN OPR
WHERE EXISTS ( SELECT 'X' FROM PS_SJT_DEPT SEC , PS_SJT_CLASS_ALL CLS ,
PS_SJT_OPR_CLS SOC WHERE SEC.SETID = DEPT.SETID AND SEC.DEPTID = DEPT.DEPTID AND
SEC.EFFDT_NOKEY = DEPT.EFFDT AND CLS.SCRTY_SET_CD = 'PPLJOB' AND CLS.SCRTY_TYPE_CD
= '001' AND CLS.TREE = 'Y' AND CLS.SCRTY_KEY1 = SEC.SCRTY_KEY1 AND CLS.SCRTY_KEY2
= SEC.SCRTY_KEY2 AND CLS.SCRTY_KEY3 = SEC.SCRTY_KEY3 AND SOC.OPRID
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 37
DBMS_MVIEW.EXPLAIN_MVIEW
SQL Build process began on 16/02/2015 at 21:05:30 for database HR92U011.
Error: Cannot create Materialized View on record DMK_JOB_CUR_MVW.
Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_COMPLETE| Y | | |
Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST| N | | |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE| N | | |
Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_INSERT| N | aggregate function in mv | |
Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_INSERT| N | multiple instances of the same table or view | |
Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_ONETAB_DML| N | see the reason why REFRESH_FAST_AFTER_INSERT is
disabled | |
Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_ANY_DML| N | see the reason why REFRESH_FAST_AFTER_ONETAB_DML is
disabled | |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_FULL_TEXT_MATCH| N | Oracle error: see RELATED_NUM and RELATED_TEXT for details |
expression not supported for query rewrite |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_FULL_TEXT_MATCH| N | Oracle error: see RELATED_NUM and RELATED_TEXT for details |
expression not supported for query rewrite |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_FULL_TEXT_MATCH| N | query rewrite is disabled on the materialized view | |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_PARTIAL_TEXT_MATCH| N | materialized view cannot support any type of query
rewrite | |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_PARTIAL_TEXT_MATCH| N | query rewrite is disabled on the materialized view | |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_GENERAL| N | subquery present in the WHERE clause | |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_GENERAL| N | materialized view cannot support any type of query rewrite | |
Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_GENERAL| N | query rewrite is disabled on the materialized view | |
SQL Build process ended on 16/02/2015 at 21:05:30.
1 records processed, 1 errors, 15 warnings.
SQL Build script for all processes written to file C:TempPSBUILD.SQL.
SQL executed online.
SQL Build log file written to C:TempPSBUILD.LOG.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 38
Oracle RDBMS Feature:
Query ReWrite
• If I have
– an expensive query, and
– a materialised view on the same query
• Oracle can
– Rewrite the query to use the Materialised view
• If
– The query on the MV is cheaper
– the view is up to date etc.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 39
Example: Query ReWrite
• Current department MV
CREATE MATERIALIZED VIEW PS_DMK_PER_DEP_MVW (SETID_DEPT,
DEPTID, EFFDT, DESCR)
TABLESPACE PSMATVW BUILD IMMEDIATE REFRESH COMPLETE ON DEMAND
enable query rewrite
AS SELECT A.SETID ,A.DEPTID ,A.EFFDT ,A.DESCR FROM
PS_DEPT_TBL A
WHERE A.EFFDT= ( SELECT MAX(B.EFFDT)
FROM PS_DEPT_TBL B
WHERE A.SETID =B.SETID
AND A.DEPTID= B.DEPTID
AND B.EFFDT<=TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY-
MM-DD'))
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 40
Example: Query ReWrite
• However, expressions - in this case one generated to
determine the current effective dated department - are not
supported for query write.
• This could limit your use of MVs.
=B.SETID AND A.DEPTID= B.DEPTID AND
B.EFFDT<=TO_DATE(TO_CHAR(SYSDATE
*
ERROR at line 7:
ORA-30353: expression not supported for
query rewrite
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 41
Refreshing MVs
• PeopleTools►Utilities ► Administration
►Oracle Materialized Views ►
Materialized View Maintenance
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 42
Simple MV Refresh Interval
• Then run Application Engine
PTMATREFVW
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 43
Simple MV Refresh Interval
• What this AE does is
&AlterSQL = "alter materialized view " |
&mview_name | " REFRESH NEXT SYSDATE + (" |
&MatRecords.PTMAT_REFINT.Value | "/86400)";
• What this AE does is
alter materialized view PS_DMK REFRESH NEXT
SYSDATE + (4242/86400)
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 44
Creates a database job
select rname, next_date, interval from user_refresh
/
RNAME NEXT_DATE INTERVAL
---------- --------- -------------------------
PS_DMK 24-JAN-15 SYSDATE + (4242/86400)
select name, type, rname, job, next_date, interval from user_refresh_children
/
NAME TYPE RNAME JOB NEXT_DATE INTERVAL
---------- ---------- ---------- ---------- --------- -------------------------
PS_DMK SNAPSHOT PS_DMK 21 24-JAN-15 SYSDATE + (4242/86400)
Select job, next_date, next_Sec, interval, what from dba_jobs
/
JOB NEXT_DATE NEXT_SEC INTERVAL
---------- --------- -------- -------------------------
WHAT
--------------------------------------------------
21 24-JAN-15 11:48:52 SYSDATE + (4242/86400)
dbms_refresh.refresh('"SYSADM"."PS_DMK"');
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 45
MV refresh considerations
• But I might want to
– Group related materialised views into a single refresh
group and a single transaction.
– Run refresh the job at a particular time
• Eg. 2am every morning.
TRUNC(SYSDATE-2/24)+1+2/24
– Refresh a materialised view at point in a batch schedule.
• Code refresh into an exisitng application engine
• Or have the application engine submit a job that only fires once
and does not resubmit
– might wait for refresh
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 46
My MV recommendations
• Good Things
– Removal of the descending indexes and creation of
the primary key
– Very useful to be able to specify the materialised view
query in PeopleTools.
• Easier to upgrade.
– Use of EXPLAIN_MVIEW to populate
MV_CAPABILITIES_TABLE
• but the messages are obscured and should be better
documented.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 47
My MV recommendations
• Bad Things
– No checking for non-null unique index on source table
– MV logs are totally overblown - too much data being logged.
• Additional columns are a waste of resource.
– Can't specify indexes on materialised view in Application Designer
• Primary key will be inherited automatically on single table materialised views.
• Will have to handle that manually outside PeopleTools.
– Flip-flopping of the build script is confusing
• you will never be completely sure what you have in the database.
• Too easy to drop the materialised view
– which will also drop any indexes that you have created manually!
– Not enough control over when a materialised view is refreshed.
• Just a time interval is not good enough. You probably want better control.
– It is clearly going to be difficult getting database query rewrite to work with
complex materialised views in PeopleSoft.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 48
My MV Conclusions
• I think some of the problems stem from
• trying to graft materialised views onto the existing view record
type,
• instead of creating a new record type and building it into
Application Designer properly.
• Possibly due to residual platform agnosticism in PeopleTools
development?
– In most system the DBAs manage MVs
• They generally resist using PSFT specific tools
• Even more so when only half the job can be done in
PeopleSoft.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 49
Global Temporary Tables
• Application temporarily needs a working storage tables.
– Introduced in Oracle 8i. Not separately licenced.
• Global because the definition is available to everyone
• Temporary because
– physical instantiation of the table is temporary
– the physical instantiation of the table is removed
• on commit preserve : when the session disconnects
• on commit delete: when the transaction is terminated
– in the temporary segment (no redo, but there is undo),
• each session gets own private copy of the table in the temp segment.
• cannot see what is in another session's temporary table
– which can make application debugging difficult.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 50
GTT Tablespace
• New feature in Oracle 11g
– Can create separate temporary tablespace and allocate GTTs
to it.
• Good idea – separate from default temp space which can be eaten
up by ad-hoc queries
– You must do this in PT8.54
• Oracle deliver scripts to create PSGTT01
• Specify tablespace as with any other record
• But it must be a temporary tablespace
• In 12c can have a temporary undo tablespace
– Can avoid redo logging on undo on GTT
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 51
GTT uses
• Temporary Records in AE
– Batch temporary table instances where restart disabled
• Better with stand-alone AE than PSAESRV
– All on-line temporary table instances
• Can be implemented without code change
• Reduction in
– Redo
– Read consistency
– High Water Mark – full scans
– RO contention with very frequent truncate
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 52
GTTs in PT8.54
DROP TABLE PS_ST_RM2_TAO
/
CREATE GLOBAL TEMPORARY TABLE PS_ST_RM2_TAO (PROCESS_INSTANCE
DECIMAL(10) NOT NULL,
EMPLID VARCHAR2(11) NOT NULL,
GRANT_NBR VARCHAR2(10) NOT NULL,
VEST_DT DATE,
SHARES_REMAINDER DECIMAL(21, 9) NOT NULL,
DEC_PLACES SMALLINT NOT NULL) ON COMMIT PRESERVE ROWS
TABLESPACE PSGTT01
/
CREATE UNIQUE iNDEX PS_ST_RM2_TAO ON PS_ST_RM2_TAO (PROCESS_INSTANCE,
EMPLID,
GRANT_NBR,
VEST_DT)
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 53
GTTs in PT8.54
• New DDL model
select * from psddlmodel where statement_Type in(6,7);
STATEMENT_TYPE PLATFORMID SIZING_SET PARMCOUNT
-------------- ---------- ---------- ----------
MODEL_STATEMENT
------------------------------------------------------------------------
6 2 0 0
CREATE GLOBAL TEMPORARY TABLE [TBNAME] ([TBCOLLIST]) ON COMMIT PRESERVE
ROWS TABLESPACE [TBSPCNAME];
7 2 0 0
CREATE [UNIQUE] INDEX [IDXNAME] ON [TBNAME] ([IDXCOLLIST]);
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 54
A small problem!
• Record name length limits
– Normal records: 15 characters
– Temporary record: 13 characters
– GTTs: 11 characters
• Because you can have 9999 non-shared instances
– Makes no sense, will never have that many processes
• So, cannot retrofit GTTs into some existing
processes
– Eg GP_GL_SEGTMP in GP_GL_PREP
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 55
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 56
My Recommendation
• GTTs are a welcome addition.
• Long overdue.
• Can bring significant benefits.
• No code change required.
• Just need to fix the 11 character limit
Partitioning
• Licenced feature of Oracle Enterprise
Addition.
• Break a table into smaller pieces
– Certain data values only occur in certain pieces
– Optimiser can eliminate partitions because it
know required data cannot be found there.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 57
Partitioning
• From Oracle 11g Database VLDB and Partitioning Guide
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 58
Partitioning prior to 8.54
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 59
• I have to declare an interest.
Partitioning prior to 8.54
• I have been partitioning PeopleSoft since PT7.54
and Oracle 8i
• It does not invalidate your support
– (not the same as E-Business Suite!)
• I have created a utility to build partition DDL
script
– Managing Oracle Table Partitioning in PeopleSoft A
pplications with GFC_PSPART
Package
• http://www.go-faster.co.uk/gfc_pspart.manual.pdf
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 60
Has Oracle shot my fox?
• Is my partitioning utility obsolete?
• How do I retrofit existing partitioning in
PeopleTools?
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 61
Example 1: Range Partitioning
PSWORKLIST
• Range Partition PSWORKLIST
– On INSTSTATUS column
• Partition on Statuses 0 and 1
– Small – current active items
• Partition on Statuses 2 and 3
– Large – historical closed items
– Application frequently uses
WHERE INSTSTATUS<2
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 62
INSTSTATUS Description
0 Available
1 Selected
2 Worked
3 Cancelled
Partitioning Utility Component
• PeopleTools►Utilities ►Partitioning Utility
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 63
Partitioning Utility Component
• Can only specify key columns as partition
key columns.
– Can customise PPMU_RECKEYS_VW
SELECT A.RECNAME
,A.FIELDNAME
FROM PSRECFIELDALL A /* WHERE
%DecMult(%Round(%DECDIV(A.USEEDIT,2),0 ) , 2) <>
A.USEEDIT*/
, PSDBFIELD B
WHERE A.FIELDNAME = B.FIELDNAME
AND B.FIELDTYPE IN(0,2,3,4,5,6)
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 64
Partitioning Utility Component
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 65
Partitioning Utility Component
• Tablespace name not mandatory
– but TABLESPACE keyword present.
• MAXVALUE partition added automatically.
• Fixed 20% free space specified
• Row Movement always enabled
• Cannot control
– Name of MAXVALUE partition
– Tablespace of MAXVALUE partition
– Physical attributes of any partition – eg PCTFREE
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 66
Partition DDL in Application
Designer
• Tools ► Data Administration ► Partitioning
• Local index DDL not valid
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 67
DDL Script problems
CREATE INDEX PSBPSWORKLIST ON PSWORKLIST (OPRID,
INSTSTATUS)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 40960 NEXT 106496 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "PSINDEX"
/
ALTER INDEX PSBPSWORKLIST NOPARALLEL LOGGING
/
CREATE INDEX PSBWORKLIST ON PSWORKLIST
('') LOCAL TABLESPACE PTTBL
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 68
Partitioning Utility Component
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 69
Partitioning Utility Component
• Meta-data not retained
• DDL Stored in CLOB in
– PS_PTTBLPARTDDL
– PS_PTIDXPARTDDL
• Other attributes are not stored
– They were typed into a derived work record
• This isn’t going to help when I
add/split/compress/remove partitions
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 70
Not integrated into Application Designer
• Data Management Guide►Administering
Databases on Oracle►Appendix E
• "Record and index partitioning is not migrated
as part of the IDE project. If you want to migrate
the partitioning metadata along with the record,
you will need to…" copy it yourself and it goes
on to recommend creating a Data Migration
Project in the Data Migration Workbench"
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 71
Example 2: Import Existing
Partitioning
CREATE TABLE sysadm.psworklist
(busprocname VARCHAR2(30) NOT NULL
…
,descr254_mixed VARCHAR2(254) NOT NULL
)
TABLESPACE PTTBL
PCTFREE 10 PCTUSED 80
PARTITION BY RANGE(INSTSTATUS)
(PARTITION psworklist_select_open VALUES
LESS THAN ('2')
,PARTITION psworklist_worked_canc VALUES
LESS THAN (MAXVALUE) PCTFREE 1 PCTUSED 90
)
ENABLE ROW MOVEMENT
PARALLEL NOLOGGING
/
…
ALTER TABLE sysadm.psworklist LOGGING
NOPARALLEL MONITORING
/
…
CREATE INDEX sysadm.ps0psworklist ON sysadm.psworklist
(transactionid
,busprocname
,activityname
,eventname
,worklistname
,instanceid
)
TABLESPACE PSINDEX
PCTFREE 10
PARALLEL NOLOGGING
/
…
CREATE INDEX sysadm.psbpsworklist ON sysadm.psworklist
(oprid
,inststatus
)
LOCAL
(PARTITION psworklistbselect_open
,PARTITION psworklistbworked_canc PCTFREE 1
)
TABLESPACE PSINDEX
PCTFREE 10
PARALLEL NOLOGGING
/
ALTER INDEX sysadm.psbpsworklist LOGGING
/
ALTER INDEX sysadm.psbpsworklist NOPARALLEL
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 72
Script created by
GFC_PSPART utility
Import DDL from Oracle Catalogue
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 73
Example 3: Partitioning in
GP_RSLT_ACUM
• Main payroll result table
– I have seen systems with >1 billion rows
– Range partition on EMPLID
– Sub-partition in CAL_RUN_ID
• Partitioning utility
– Cannot specify tablespace on sub-partition
template
– So swapped partition keys
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 74
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 75
Generated DDL uses template
syntax
PARTITION BY RANGE (CAL_RUN_ID)
SUBPARTITION BY RANGE (EMPLID)
SUBPARTITION TEMPLATE
(
SUBPARTITION SUB1 VALUES LESS THAN ('K9999999999'),
SUBPARTITION SUB2 VALUES LESS THAN ('KE999999999'),
SUBPARTITION SUB3 VALUES LESS THAN ('KM999999999'),
SUBPARTITION SUB4 VALUES LESS THAN ('KT999999999') ,
SUBPARTITION PE_MAXVALUE VALUES LESS THAN (MAXVALUE)
)
(
PARTITION STRM1 VALUES LESS THAN ('K9999999999') TABLESPACE GPPART1,
PARTITION STRM2 VALUES LESS THAN ('KE999999999') TABLESPACE GPPART2,
PARTITION STRM3 VALUES LESS THAN ('KM999999999') TABLESPACE GPPART3,
PARTITION STRM4 VALUES LESS THAN ('KT999999999') TABLESPACE GPPART4,
PARTITION PE_MAXVALUE VALUES LESS THAN (MAXVALUE) TABLESPACE GPPART4
)
PCTFREE 20 ENABLE ROW MOVEMENT
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 76
Partitioning in Global Payroll
• In GP with GB extensions
– 45 similarly range partitioned tables
– 2 – 6 of which are sub partitioned
• I want define a single partitioning strategy
– Apply it to 45 tables.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 77
My opinion
• This utility doesn’t help me manage a complex
partitioning strategy over time.
• I had expected an extension to the structured metadata
in the PeopleTools tables.
– None of the attributes that I enter are stored. They are lost
when I leave the component.
– What we have is a one time DDL generator, and then we
store the DDL
• The partitioning utility component doesn’t do much I
can’t do with a text editor
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 78
%SQLHint Meta-SQL
• Processed after all other expansions and meta-SQL
– Searches SQL string
– finds nth
occurrence of SQL keword
– Inserts a string after it
• Particularly effective with %InsertSelect() meta-
SQL.
• Advantage for Oracle’s own developers
– Platform specific hints
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 79
Prior to 8.54
• This is how to hint %InsertSelect
%InsertSelect(DISTINCT, DMK,JOB J,
EMPLID= /*+LEADING(J)*/ J.EMPLID)
FROM PS_JOB J
• This example shows why it can fail
– The hint is in the wrong place
INSERT INTO PS_DMK
(EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID)
SELECT DISTINCT /*+LEADING(J)*/ J.EMPLID, J.EMPL_RCD,
J.EFFDT, J.EFFSEQ, J.SETID_DEPT, J.DEPTID
FROM PS_JOB J
…
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 80
Contrived Example
%SqlHint(INSERT,1,'/*+APPEND*/',ORACLE,ENABLE)
%SqlHint(INSERT,1,'/*Developer Comment*/',ORACLE,DISABLE)
%SqlHint(SELECT,1,'/*+LEADING(J)*/',ORACLE)
%SqlHint(SELECT,2,'/*+UNNEST(J1)*/',ORACLE)
%SqlHint(SELECT,3,'/*+UNNEST(J2)*/',ORACLE)
%InsertSelect(DISTINCT, DMK,JOB J)
FROM PS_JOB J
WHERE %Sql(DMK_CURJOB,JOB,J,J1,J2)
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 81
SQL object that contains
EFFDT and EFFSEQ
subqueries
Insert in Direct Path Mode
Disabled Hint is a nice way to
get a comment into the code
but not the SQL
Leading hint in main query
Unnest hints into sub-query in
SQL object
Result of Contrived Example
INSERT /*+APPEND*/ INTO PS_DMK (EMPLID
, EMPL_RCD
, EFFDT
, EFFSEQ
, SETID_DEPT
, DEPTID)
SELECT /*+LEADING(J)*/ DISTINCT J.EMPLID
, J.EMPL_RCD
, J.EFFDT
, J.EFFSEQ
, J.SETID_DEPT
, J.DEPTID
FROM PS_JOB J
WHERE J.EFFDT = (
SELECT /*+UNNEST(J1)*/ MAX(J1.EFFDT)
FROM JOB J1
WHERE J1.EMPLID = J.EMPLID
AND J1.EMPL_RCD = J.EMPL_RCD
AND J1.EFFDT <= TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY-MM-DD'))
AND J.EFFSEQ = (
SELECT /*+UNNEST(J2)*/ MAX(J2.EFFSEQ)
FROM JOB J2
WHERE J2.EMPLID = J.EMPLID
AND J2.EMPL_RCD = J.EMPL_RCD
AND J2.EFFDT = J.EFFDT)
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 82
Plan Stability in Oracle
• Oracle has various technologies to control execution
plan
– SQL Outlines
– SQL Profiles
– SQL Patches
– SQL Baselines
• Application Engine can defeat these
– Different temporary table instances
– Dynamic code
– Migration of plan stability with code changes
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 83
Conclusion
• Excellent new feature
• Simple
• Effective
• I look forward to hint the places that other
techniques cannot reach!
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 84
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 85
%SelectDummyTable Meta-SQL
• Simply evaluates to DUAL
• Dual is a convenience table that provides a
single row
– PeopleSoft often uses PS_INSTALLATION
– Dual is not a table, but a memory structure
• It doesn’t even require a logical read.
– Removes risk that PS_INSTALLATION has 0
or many rows.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 86
Example
• Instead of (see ESPP_REF_REVMAIN.PSHUP.Do When)
%Select(IF_FLAG)
SELECT 'X'
FROM PS_INSTALLATION
WHERE %Bind(ST_SEND_SRC) = 'N'
• Code this
%Select(IF_FLAG)
SELECT 'X'
FROM %SelectDummyTable
WHERE %Bind(ST_SEND_SRC) = 'N'
• Which resolves to
%Select(IF_FLAG)
SELECT 'X'
FROM DUAL
WHERE %Bind(ST_SEND_SRC) = 'N'
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 87
Conclusion
• Small, simple improvement
• I would not change code just to get this in,
but I would use it going forward
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 88
Multiple Security Records
• This is new behaviour in PeopleTools 8.54
– that could impact database performance
• Release notes:
– “PeopleTools has added an Advanced Query Security option
to Application Designer. This feature allows up to five Query
Security Records to be associated with a single record,
including the ability to associate security with non-key fields.
– “While powerful, this feature should be used sparingly
because multiple additional joins will affect query
performance.”
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 89
• Security record joined in
query by key columns in
common
Query Security prior to PT8.54
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 90
PS/Query SQL
SELECT B.EMPLID, B.DEPTID
FROM PS_JOB B, PS_EMPLMT_SRCH_QRY B1, PS_NAMES A, PS_PERALL_SEC_QRY A1
WHERE ( B.EMPLID = B1.EMPLID
AND B.EMPL_RCD = B1.EMPL_RCD
AND B1.OPRID = 'PS'
AND A.EMPLID = A1.EMPLID
AND A1.OPRID = 'PS'
AND ( B.EFFDT =
(SELECT MAX(B_ED.EFFDT) FROM PS_JOB B_ED
WHERE B.EMPLID = B_ED.EMPLID
AND B.EMPL_RCD = B_ED.EMPL_RCD
AND B_ED.EFFDT <= SYSDATE)
AND B.EFFSEQ =
(SELECT MAX(B_ES.EFFSEQ) FROM PS_JOB B_ES
WHERE B.EMPLID = B_ES.EMPLID
AND B.EMPL_RCD = B_ES.EMPL_RCD
AND B.EFFDT = B_ES.EFFDT)
AND B.EMPLID = A.EMPLID
AND A.EFFDT =
(SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED
WHERE A.EMPLID = A_ED.EMPLID
AND A.NAME_TYPE = A_ED.NAME_TYPE
AND A_ED.EFFDT <= SYSDATE) ))
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 91
Join on key columns in
common
Multiple query security
records often cause
performance problems
Multiple Query Security records
• Can specify join columns
– Stored in PSRECSECFLDMAPS.
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 92
PS/Query with
multiple security records
SELECT B.EMPLID, B.DEPTID
FROM PS_JOB B, PS_EMPLMT_SRCH_QRY B1, PS_EMPLMT_SRCH_QRY B4, PS_PERALL_SEC_QRY B5, PS_PERS_SRCH_QRY B6, PS_NAMES A, PS_PERALL_SEC_QRY A1
WHERE ( B.EMPLID = B1.EMPLID
AND B.EMPL_RCD = B1.EMPL_RCD
AND B1.OPRID = 'PS'
AND B.EMPLID = B4.EMPLID
AND B.EMPL_RCD = B4.EMPL_RCD
AND B4.OPRID = 'PS'
AND B.EMPLID = B5.EMPLID
AND B5.OPRID = 'PS'
AND B.EMPLID = B6.EMPLID
AND B6.OPRID = 'PS'
AND A.EMPLID = A1.EMPLID
AND A1.OPRID = 'PS'
AND ( B.EFFDT =
(SELECT MAX(B_ED.EFFDT) FROM PS_JOB B_ED
WHERE B.EMPLID = B_ED.EMPLID
AND B.EMPL_RCD = B_ED.EMPL_RCD
AND B_ED.EFFDT <= SYSDATE)
AND B.EFFSEQ =
(SELECT MAX(B_ES.EFFSEQ) FROM PS_JOB B_ES
WHERE B.EMPLID = B_ES.EMPLID
AND B.EMPL_RCD = B_ES.EMPL_RCD
AND B.EFFDT = B_ES.EFFDT)
AND B.EMPLID = A.EMPLID
AND A.EFFDT =
(SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED
WHERE A.EMPLID = A_ED.EMPLID
AND A.NAME_TYPE = A_ED.NAME_TYPE
AND A_ED.EFFDT <= SYSDATE) ))
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 93
A1 & B1 are original query
security records
B4, B5 and B6 are new query
security records
EMPLMT_SRCH_QRY was
joined twice
Conclusion
• Multiple query security records can be
cause of performance problems
– Must be serious if the release notes mentions it.
– Useful if joining security on non-key field
– Otherwise I might prefer to merge security
views
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 94
Oracle Resource Manager
• Resource Manager
– Restricting sessions
– Prioritising one database session over another
• Resource Plan
– Set of rules applied to some or all sessions
– Must reflect business priorities
– Requires careful design
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 95
Oracle Resource Manager in PeopleTools
8.54
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 96
PeopleSoft Executable
→Resource Map
• At process startup lookup process on
PS_PTEXEC2RESOURCE
SELECT PT_ORA_CONSUMR_GRP
FROM PS_PT_ORA_RESOURCE
, PS_PTEXEC2RESOURCE
WHERE PT_EXECUTABLE_NAME = 'PSAPPSRV'
AND PT_ORA_CONSUMR_GRP <> ' '
AND PS_PT_ORA_RESOURCE.PT_RESOURCE_NAME = PS_PTEXEC2RESOURCE.PT_RESOURCE_NAME
PT_ORA_CONSUMR_GRP
------------------------
INTERACTIVE_GROUP
• And then explicity switch group
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 97
PS_PTEXEC2RESOURCE Mappings
• I question one or two of the mappings on
PS_PTEXEC2RESOURCE
– Which you could change
SELECT * FROM PS_PTEXEC2RESOURCE …
PT_EXECUTABLE_NAME PT_RESOURCE_NAME
-------------------------------- ------------------
…
PSAPPSRV APPLICATION SERVER
PSNVS MISCELLANEOUS
PSQED MISCELLANEOUS
PSQRYSRV QUERY SERVER
…
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 98
Oracle Resource Manager
• Explicit switch overrides any automatic
switches by session attribute.
• Cannot mix
– PeopleSoft Consumer Groups &
– Oracle Consumer Group Mappings
• Eg. By MODULE/ACTION
• Resource group for a particular component
• Would have to delete mapping from
PS_PTEXEC2RESOURCE
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 99
Consumer Group Mapping
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING
(attribute => 'MODULE_NAME'
,value => 'PROCESSMONITOR'
,consumer_group => 'SYS_GROUP');
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
END;
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 100
Consumer Group Mapping
Priority
BEGIN
DBMS_RESOURCE_MANAGER.set_consumer_group_mapping_pri (
explicit => 1,
oracle_user => 2,
service_name => 3,
client_os_user => 4,
client_program => 5,
client_machine => 6,
module_name_action => 7,
module_name => 8,
service_module_action => 9,
service_module => 10
);
END;
/
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 101
Explicit must be priority 1
Conclusion
• A good start, but need more granularity.
• Specify consumer group by
– Specific scheduled process
– Application server domain
• Eg PIA –v- IB –v- nVision
• Eg. Back office –v- Self Service
– Useful on RAC
– Essential on Multi-tenant
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 102
Performance Monitor
enhancements
• Transaction history component search
– Multiple systems
– Multiple transaction types
• Tuxedo Queuing reported
– Fixed in 8.53?
• Improvements to Archive/Purge process
• JMX support for connection to OEM?
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 103
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 104
EnableAEMonitoring
• Application Engine Instrumentation
– Calls to DBMS_APPPLICATION_INFO
– Disabled by default from PT8.52.23 & PT8.53.13
• Performance degradation in DO LOOP processing
– New Parameter to reenable
• Oracle Bug 10130415 Latch contention on "
resmgr group change latch“
– Fixed 11.2.0.3
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 105
New Parameter in psprcs.cfg
• New Parameters to re-enable instrumentation.
– This is highly recommended
[Database
Options] ;=====================================================================
====
; Database-specific configuration
options ;=======================================================================
==
…
;DMK - added to enable DBMS_APPLICATION_INFO instrumentation
EnableAEMonitoring=1
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 106
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 107
Conclusion
• Lots of new performance/management features in
PT8.54
– Clear move away from platform agnosticism in favour
of explicit support for Oracle RDBMS features.
– Some have some rough edges
– Some require more development
• It will be a while before we see some of them
used in delivered code.
– We can start to use them now.
Questions?
PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 109
Conclusion
• Lots of new performance/management features in
PT8.54
– Clear move away from platform agnosticism in favour
of explicit support for Oracle RDBMS features.
– Some have some rough edges
– Some require more development
• It will be a while before we see some of them
used in delivered code.
– We can start to use them now.

More Related Content

PPTX
MySQL Performance Schema : fossasia
PPTX
Oracle AWR Data mining
PDF
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
PPTX
LVOUG meetup #4 - Case Study 10g to 11g
PDF
Upcoming changes in MySQL 5.7
PDF
Oracle SQL Tuning
PDF
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
PDF
2008 Collaborate IOUG Presentation
MySQL Performance Schema : fossasia
Oracle AWR Data mining
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
LVOUG meetup #4 - Case Study 10g to 11g
Upcoming changes in MySQL 5.7
Oracle SQL Tuning
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
2008 Collaborate IOUG Presentation

Similar to PeopleTools 8.54 Features for the Oracle DBA (20)

PDF
COUG_AAbate_Oracle_Database_12c_New_Features
PPT
Collaborate 2011-tuning-ebusiness-416502
PDF
collab2011-tuning-ebusiness-421966.pdf
PDF
2020-TipsAndTrickssssasdfasdfasdfasdfasdf.pdf
PPTX
Oracle Goldengate Architecture & Setup.pptx
PDF
Spark Summit EU talk by Mike Percy
PDF
Free oracle performance tools
PPTX
DBA Commands and Concepts That Every Developer Should Know - Part 2
PPTX
DBA Commands and Concepts That Every Developer Should Know - Part 2
PDF
Ebs dba con4696_pdf_4696_0001
PDF
Oracle_Patching_Untold_Story_Final_Part2.pdf
PDF
DB12c: All You Need to Know About the Resource Manager
PPT
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
PPTX
E business suite r12.2 changes for database administrators
PPTX
E business suite r12.2 changes for database administrators
PDF
DB12c: All You Need to Know About the Resource Manager
PPTX
Top 10 tips for Oracle performance
PDF
How Oracle Single/Multitenant will change a DBA's life
PDF
Meetup my sql5.6_cluster
PDF
MySQL Manchester TT - Performance Tuning
COUG_AAbate_Oracle_Database_12c_New_Features
Collaborate 2011-tuning-ebusiness-416502
collab2011-tuning-ebusiness-421966.pdf
2020-TipsAndTrickssssasdfasdfasdfasdfasdf.pdf
Oracle Goldengate Architecture & Setup.pptx
Spark Summit EU talk by Mike Percy
Free oracle performance tools
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
Ebs dba con4696_pdf_4696_0001
Oracle_Patching_Untold_Story_Final_Part2.pdf
DB12c: All You Need to Know About the Resource Manager
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
E business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administrators
DB12c: All You Need to Know About the Resource Manager
Top 10 tips for Oracle performance
How Oracle Single/Multitenant will change a DBA's life
Meetup my sql5.6_cluster
MySQL Manchester TT - Performance Tuning
Ad

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
top salesforce developer skills in 2025.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
history of c programming in notes for students .pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Transform Your Business with a Software ERP System
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
AI in Product Development-omnex systems
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
medical staffing services at VALiNTRY
Digital Strategies for Manufacturing Companies
Design an Analysis of Algorithms I-SECS-1021-03
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Odoo POS Development Services by CandidRoot Solutions
top salesforce developer skills in 2025.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
history of c programming in notes for students .pptx
Operating system designcfffgfgggggggvggggggggg
Transform Your Business with a Software ERP System
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Navsoft: AI-Powered Business Solutions & Custom Software Development
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
AI in Product Development-omnex systems
ISO 45001 Occupational Health and Safety Management System
2025 Textile ERP Trends: SAP, Odoo & Oracle
Design an Analysis of Algorithms II-SECS-1021-03
VVF-Customer-Presentation2025-Ver1.9.pptx
medical staffing services at VALiNTRY
Ad

PeopleTools 8.54 Features for the Oracle DBA

  • 1. PeopleTools 8.54 for the Oracle DBA David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk www.go-faster.co.uk
  • 2. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 2 • Oracle Database Specialist • PeopleSoft – Independent consultant • Performance tuning – PeopleSoft ERP – Oracle RDBMS • Book – www.psftdba.com • Oak Table • . Who Am I?
  • 3. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 3 Resources • The presentation is available from • http://www.go-faster.co.uk • It started out as a series of blog postings – http://blog.psftdba.com/2015/02/peopletools-85 4-for-oracle-dba.html – http://blog.psftdba.com/search/label/PeopleTool s 8.54
  • 4. Agenda • There is lots of new stuff in PeopleTools 8.54. – Fluid UI – Graphical Reporting – Upgrade & Configuration management – Security enhancements • This presentation looks at support for Oracle database performance features PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 4
  • 5. Agenda • Descending Key Indexes • Materialised Views • Global Temporary Tables • Partitioning • %SQLHint Meta-SQL • %SelectDummyTable Meta-SQL • Multiple Security Records • Oracle Resource Manager • Performance Monitor enhancements • EnableAEMonitoring PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 5
  • 6. Descending Indexes • They have gone again! – Originally, descending fields → descending columns in key indexes – PT8.14 ascending indexes due to bug in Oracle 8i – PT8.48 descending indexes reinstated. First version not certified below Oracle 9i – PT8.54 only ascending indexes built. Including user indexes. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 6
  • 7. Does it matter? • Index leaf nodes are chained in both directions. – So a descending index can be used for an ascending scan and vice versa • Min/max range scan optimisation – Doesn’t work with descending indexes – Ascending index can be slightly better PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 7
  • 8. Ascending Scan Descending Index WHERE name <=‘Clark’ • Descending indexes use sys_op_descend() PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 8 Ward Smith Martin Jones Ford Allen Turner King Ward Turner Smith Scott Miller Ford Clark Blake Jones James Allen Adams Martin King
  • 9. Ascending Index Scan WHERE name <=‘Clark’ PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 9 Adams King Adams Blake James King Miller Turner Adams Allen Blake Clark Ford James Jones Turner Ward Miller Scott Smith King Martin
  • 10. Descending Scan Ascending Index WHERE name <=‘Clark’ PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 10 Adams King Adams Blake James King Miller Turner Adams Allen Blake Clark Ford James Jones Turner Ward Miller Scott Smith King Martin • /*+INDEX_DESC()*/ hint
  • 11. Limitations of Descending Indexes PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 12 • Implemented in Oracle as function based indexes – Use sys_op_descend() • A unique function-based index cannot be used to support a primary key. • Some things need a primary key, not just a unique index.
  • 12. Requirements of Primary Keys PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 13 • All columns in primary key must be non- nullable – In PeopleSoft • All character and numeric columns are non-nullable • Required dates are non-nullable • Cannot index CLOB/BLOB columns • Only leaves non-required dates.
  • 13. Non-nullable unique index PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 14 • Primary key – PK based replication of materialised views • (more about this later) – Star Schema transformations – Reference partition • Logical standby – Doesn’t actually need primary keys – Does need index to uniquely identify rows. – Otherwise generates supplementary logging
  • 14. Primary Keys PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 15 • Normal unique indexes on only non- nullable columns can support primary keys create unique index t2 on t(b); alter table t add constraint PK_ON_FUNC primary key (b) using index t2;
  • 15. Upgrade considerations PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 16 • Lots of descending indexes, – mostly on EFFDT • Suggestion – Pave the way for the upgrade – Set Oracle initialisation parameter to prevent creation of descending index • _IGNORE_DESC_IN_INDEX = TRUE
  • 16. Conclusion PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 17 • Replacement of descending indexes – should produce small improvement • especially to effective-date/sequence sub-queries – Opens opportunity to use other Oracle features – Why wait for PT8.54?
  • 17. Materialised Views • Snapshots introduced in Oracle7 • Renamed Materialized Views in Oracle 8i – Table that contains results of a query – Hidden triggers to maintain MV logs – Oracle supplied package • DBMS_MVIEW to maintain them • DBMS_REFRESH – Incremental refresh of single table MV • Primary Key –or- ROWID – Complete refresh of complex MV – Populate on creation or later PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 18
  • 18. Why Materialise a View? • Performance advantages over accessing underlying data directly – latency • Reduction in I/O, mostly physical – Different database – Subset of rows – Subset of columns – Different indexing PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 19
  • 19. Materialised Views in PT8.54 • PeopleSoft Documentation: – Data Management, Using Materialized Views • New PeopleTools tables – PSPTMATVWDEFN • addition definition fields for the MV, build, refresh, staleness, stats. • Doesn't contain the query, that is in PSSQLTEXTDEFN as it is for all other views. – PSPTMATVWDEP • lists tables upon which MV depends. • PeopleSoft seems to work this out for itself by parsing the SQL query. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 20
  • 20. Example 1: Replicate part of JOB • Subset of columns • Across a database link from another database. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 21
  • 21. Example 1: Replicate part of JOB PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 22
  • 22. MV Design – Thought required • Refresh method – Complete – mandatory for complex views – Fast – single table only, probably across DB link • Refresh mode – On commit: could affect DML on source table – On demand: manually issued refresh at specific point – Scheduled: database job PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 23
  • 23. Build Script: MV doesn’t exist (1) DROP VIEW PS_DMK / CREATE VIEW PS_DMK (EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID) AS SELECT EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT , DEPTID FROM PS_JOB@HROTHER / UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 0, PTMAT_REFRESHSTAT = 0, PTMAT_LASTREFRESH = TO_TIMESTAMP('1900-01-01-00.00.00.000000' ,'YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE' WHERE RECNAME = 'DMK' / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 24
  • 24. Build Script: MV doesn’t exist (2) DELETE FROM MV_CAPABILITIES_TABLE WHERE MVNAME = 'PS_DMK' / DROP VIEW PS_DMK / CREATE MATERIALIZED VIEW PS_DMK (EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID) TABLESPACE PSMATVW BUILD DEFERRED REFRESH FAST ON DEMAND DISABLE QUERY REWRITE AS SELECT EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT , DEPTID FROM PS_JOB@HROTHER / UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 1, PTMAT_REFRESHSTAT = 0, PTMAT_LASTREFRESH = TO_TIMESTAMP('1900-01-01-00.00.00.000000' ,'YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE' WHERE RECNAME = 'DMK' / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 25
  • 25. Build Script: MV exists DROP MATERIALIZED VIEW PS_DMK / UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 0, PTMAT_REFRESHSTAT = 0, PTMAT_LASTREFRESH = TO_TIMESTAMP('1900- 01-01-00.00.00.000000','YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE' WHERE RECNAME = 'DMK' / CREATE VIEW PS_DMK (EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID) AS SELECT EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT , DEPTID FROM PS_JOB@HROTHER / UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 0, PTMAT_REFRESHSTAT = 0, PTMAT_LASTREFRESH = TO_TIMESTAMP('1900- 01-01-00.00.00.000000','YYYY-MM-DD-HH24.MI.SS.FF'), PTMAT_STALENESS = 'STALE' WHERE RECNAME = 'DMK' / DELETE FROM MV_CAPABILITIES_TABLE WHERE MVNAME = 'PS_DMK' / DROP VIEW PS_DMK / CREATE MATERIALIZED VIEW PS_DMK (EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID) TABLESPACE PSMATVW BUILD IMMEDIATE REFRESH FAST ON DEMAND DISABLE QUERY REWRITE AS SELECT EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT , DEPTID FROM PS_JOB@HROTHER / UPDATE PSPTMATVWDEFN SET PTMAT_MATSTAT = 1, PTMAT_REFRESHSTAT = 1, (PTMAT_LASTREFRESH, PTMAT_STALENESS) = (SELECT LAST_REFRESH_DATE, STALENESS FROM USER_MVIEWS WHERE MVIEW_NAME = 'PS_DMK') WHERE RECNAME = 'DMK' / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 26
  • 26. Must have primary key on source table • Application Desigenr can only build primary key based MVs. • If source table doesn’t have primary ORA-12014: table 'PS_JOB' does not contain a primary key constraint – Because on remote database. – If PT 8.48-8.53 then it may have a descending index! • You have to handle this manually – Create materialised view log manually too. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 27
  • 27. Indexing MVs PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 28 • Cannot specify indexes
  • 28. Indexing MVs • Primary key automatically inherited on single table MV replicated by MV • Alternate search columns on MV not indexed – Must handle indexes on MV manually • Cannot define user indexes on MV – Might be necessary because querying MV differently to base table. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 29
  • 29. Example 2: Replicate part of PS_JOB locally • Create primary key on source table • Create materialised view log on source table • But – Build script repeatedly rebuilds MV log and MV • Could be a problem for large MV – Generated build script alternated between dropping and building MV • You don’t know if the build script is going to do the right thing! – clearly a bug. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 31
  • 30. MV Log created with additional columns CREATE MATERIALIZED VIEW LOG ON PS_JOB TABLESPACE PSMATVW WITH PRIMARY KEY , ROWID , SEQUENCE(DEPTID, SETID_DEPT) INCLUDING NEW VALUES PURGE IMMEDIATE / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 32
  • 31. MV Log created with additional columns SQL> desc mlog$_ps_job Name Null? Type ----------------------------- -------- ------------------- EFFDT DATE EFFSEQ NUMBER EMPLID VARCHAR2(11 CHAR) EMPL_RCD NUMBER DEPTID VARCHAR2(10 CHAR) SETID_DEPT VARCHAR2(5 CHAR) M_ROW$$ VARCHAR2(255 CHAR) SEQUENCE$$ NUMBER SNAPTIME$$ DATE DMLTYPE$$ VARCHAR2(1 CHAR) OLD_NEW$$ VARCHAR2(1 CHAR) CHANGE_VECTOR$$ RAW(255) XID$$ NUMBER PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 33
  • 32. MVs in Application Designer are more like Views than Tables! • MV and MV logs always built in tablespace PSMATVW – I can’t find a way to control! – I would put logs in separate tablespace to MVs • No storage clause on Materialised View – Cannot control space allocation in block • Need attributes of a table as well as of a view PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 34
  • 33. Example 3: MV of Security View • PS_SJT_DEPT not added to PSPTMATVWDEP – Because has duplicate key SELECT … FROM PS_DEPT_TBL DEPT , PSOPRDEFN OPR WHERE EXISTS ( SELECT 'X' FROM PS_SJT_DEPT SEC , PS_SJT_CLASS_ALL CLS , PS_SJT_OPR_CLS SOC …) OR EXISTS ( SELECT 'X' FROM PS_SJT_DEPT SEC , PS_SJT_CLASS_ALL CLS , PS_SJT_OPR_CLS SOC …) OR EXISTS ( SELECT 'X' FROM PS_SJT_DEPT SEC , PS_SJT_CLASS_ALL CLS , PS_SJT_OPR_CLS SOC …) PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 35
  • 34. Example 3: PK validation? ALTER TABLE PS_SJT_DEPT ADD CONSTRAINT PS_SJT_DEPT_PK PRIMARY KEY (SCRTY_KEY1, SCRTY_KEY2, SCRTY_KEY3, SCRTY_TYPE_CD, SETID) Error: DMK_DPT_SEC_MVW - SQL Error. Error Position: 39 Return: 2437 - ORA-02437: cannot validate (SYSADM.PS_SJT_DEPT_PK) - primary key violated • Application Designer worked out that PS_SJT_DEPT was referenced by the MV • But it didn’t realise that it didn’t have a unique key that could be turned into a primary key. • The error was produced because we did have duplicate data. • Complex MV doesn’t need PK on source tables for complete refresh. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 36
  • 35. MV_CAPABILITIES_TABLE • This produces error during script generation! EXECUTE DBMS_MVIEW.EXPLAIN_MVIEW (q'[CREATE MATERIALIZED VIEW PS_DMK_DPT_SEC_MVW (SETID, OPRID, DEPTID, DESCR, DESCRSHORT, SETID_LOCATION, LOCATION, MANAGER_ID, COMPANY, USE_BUDGETS, USE_ENCUMBRANCES) TABLESPACE PSMATVW BUILD DEFERRED REFRESH FAST ON DEMAND AS SELECT DEPT.SETID, OPR.OPRID, DEPT.DEPTID , DEPT.DESCR , DEPT.DESCRSHORT , DEPT.SETID_LOCATION , DEPT.LOCATION , DEPT.MANAGER_ID , DEPT.COMPANY , DEPT.USE_BUDGETS , DEPT.USE_ENCUMBRANCES FROM PS_DEPT_TBL DEPT , PSOPRDEFN OPR WHERE EXISTS ( SELECT 'X' FROM PS_SJT_DEPT SEC , PS_SJT_CLASS_ALL CLS , PS_SJT_OPR_CLS SOC WHERE SEC.SETID = DEPT.SETID AND SEC.DEPTID = DEPT.DEPTID AND SEC.EFFDT_NOKEY = DEPT.EFFDT AND CLS.SCRTY_SET_CD = 'PPLJOB' AND CLS.SCRTY_TYPE_CD = '001' AND CLS.TREE = 'Y' AND CLS.SCRTY_KEY1 = SEC.SCRTY_KEY1 AND CLS.SCRTY_KEY2 = SEC.SCRTY_KEY2 AND CLS.SCRTY_KEY3 = SEC.SCRTY_KEY3 AND SOC.OPRID PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 37
  • 36. DBMS_MVIEW.EXPLAIN_MVIEW SQL Build process began on 16/02/2015 at 21:05:30 for database HR92U011. Error: Cannot create Materialized View on record DMK_JOB_CUR_MVW. Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_COMPLETE| Y | | | Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST| N | | | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE| N | | | Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_INSERT| N | aggregate function in mv | | Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_INSERT| N | multiple instances of the same table or view | | Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_ONETAB_DML| N | see the reason why REFRESH_FAST_AFTER_INSERT is disabled | | Warning: | PS_DMK_DPT_SEC_MVW | REFRESH_FAST_AFTER_ANY_DML| N | see the reason why REFRESH_FAST_AFTER_ONETAB_DML is disabled | | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_FULL_TEXT_MATCH| N | Oracle error: see RELATED_NUM and RELATED_TEXT for details | expression not supported for query rewrite | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_FULL_TEXT_MATCH| N | Oracle error: see RELATED_NUM and RELATED_TEXT for details | expression not supported for query rewrite | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_FULL_TEXT_MATCH| N | query rewrite is disabled on the materialized view | | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_PARTIAL_TEXT_MATCH| N | materialized view cannot support any type of query rewrite | | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_PARTIAL_TEXT_MATCH| N | query rewrite is disabled on the materialized view | | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_GENERAL| N | subquery present in the WHERE clause | | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_GENERAL| N | materialized view cannot support any type of query rewrite | | Warning: | PS_DMK_DPT_SEC_MVW | REWRITE_GENERAL| N | query rewrite is disabled on the materialized view | | SQL Build process ended on 16/02/2015 at 21:05:30. 1 records processed, 1 errors, 15 warnings. SQL Build script for all processes written to file C:TempPSBUILD.SQL. SQL executed online. SQL Build log file written to C:TempPSBUILD.LOG. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 38
  • 37. Oracle RDBMS Feature: Query ReWrite • If I have – an expensive query, and – a materialised view on the same query • Oracle can – Rewrite the query to use the Materialised view • If – The query on the MV is cheaper – the view is up to date etc. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 39
  • 38. Example: Query ReWrite • Current department MV CREATE MATERIALIZED VIEW PS_DMK_PER_DEP_MVW (SETID_DEPT, DEPTID, EFFDT, DESCR) TABLESPACE PSMATVW BUILD IMMEDIATE REFRESH COMPLETE ON DEMAND enable query rewrite AS SELECT A.SETID ,A.DEPTID ,A.EFFDT ,A.DESCR FROM PS_DEPT_TBL A WHERE A.EFFDT= ( SELECT MAX(B.EFFDT) FROM PS_DEPT_TBL B WHERE A.SETID =B.SETID AND A.DEPTID= B.DEPTID AND B.EFFDT<=TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY- MM-DD')) / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 40
  • 39. Example: Query ReWrite • However, expressions - in this case one generated to determine the current effective dated department - are not supported for query write. • This could limit your use of MVs. =B.SETID AND A.DEPTID= B.DEPTID AND B.EFFDT<=TO_DATE(TO_CHAR(SYSDATE * ERROR at line 7: ORA-30353: expression not supported for query rewrite PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 41
  • 40. Refreshing MVs • PeopleTools►Utilities ► Administration ►Oracle Materialized Views ► Materialized View Maintenance PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 42
  • 41. Simple MV Refresh Interval • Then run Application Engine PTMATREFVW PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 43
  • 42. Simple MV Refresh Interval • What this AE does is &AlterSQL = "alter materialized view " | &mview_name | " REFRESH NEXT SYSDATE + (" | &MatRecords.PTMAT_REFINT.Value | "/86400)"; • What this AE does is alter materialized view PS_DMK REFRESH NEXT SYSDATE + (4242/86400) PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 44
  • 43. Creates a database job select rname, next_date, interval from user_refresh / RNAME NEXT_DATE INTERVAL ---------- --------- ------------------------- PS_DMK 24-JAN-15 SYSDATE + (4242/86400) select name, type, rname, job, next_date, interval from user_refresh_children / NAME TYPE RNAME JOB NEXT_DATE INTERVAL ---------- ---------- ---------- ---------- --------- ------------------------- PS_DMK SNAPSHOT PS_DMK 21 24-JAN-15 SYSDATE + (4242/86400) Select job, next_date, next_Sec, interval, what from dba_jobs / JOB NEXT_DATE NEXT_SEC INTERVAL ---------- --------- -------- ------------------------- WHAT -------------------------------------------------- 21 24-JAN-15 11:48:52 SYSDATE + (4242/86400) dbms_refresh.refresh('"SYSADM"."PS_DMK"'); PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 45
  • 44. MV refresh considerations • But I might want to – Group related materialised views into a single refresh group and a single transaction. – Run refresh the job at a particular time • Eg. 2am every morning. TRUNC(SYSDATE-2/24)+1+2/24 – Refresh a materialised view at point in a batch schedule. • Code refresh into an exisitng application engine • Or have the application engine submit a job that only fires once and does not resubmit – might wait for refresh PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 46
  • 45. My MV recommendations • Good Things – Removal of the descending indexes and creation of the primary key – Very useful to be able to specify the materialised view query in PeopleTools. • Easier to upgrade. – Use of EXPLAIN_MVIEW to populate MV_CAPABILITIES_TABLE • but the messages are obscured and should be better documented. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 47
  • 46. My MV recommendations • Bad Things – No checking for non-null unique index on source table – MV logs are totally overblown - too much data being logged. • Additional columns are a waste of resource. – Can't specify indexes on materialised view in Application Designer • Primary key will be inherited automatically on single table materialised views. • Will have to handle that manually outside PeopleTools. – Flip-flopping of the build script is confusing • you will never be completely sure what you have in the database. • Too easy to drop the materialised view – which will also drop any indexes that you have created manually! – Not enough control over when a materialised view is refreshed. • Just a time interval is not good enough. You probably want better control. – It is clearly going to be difficult getting database query rewrite to work with complex materialised views in PeopleSoft. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 48
  • 47. My MV Conclusions • I think some of the problems stem from • trying to graft materialised views onto the existing view record type, • instead of creating a new record type and building it into Application Designer properly. • Possibly due to residual platform agnosticism in PeopleTools development? – In most system the DBAs manage MVs • They generally resist using PSFT specific tools • Even more so when only half the job can be done in PeopleSoft. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 49
  • 48. Global Temporary Tables • Application temporarily needs a working storage tables. – Introduced in Oracle 8i. Not separately licenced. • Global because the definition is available to everyone • Temporary because – physical instantiation of the table is temporary – the physical instantiation of the table is removed • on commit preserve : when the session disconnects • on commit delete: when the transaction is terminated – in the temporary segment (no redo, but there is undo), • each session gets own private copy of the table in the temp segment. • cannot see what is in another session's temporary table – which can make application debugging difficult. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 50
  • 49. GTT Tablespace • New feature in Oracle 11g – Can create separate temporary tablespace and allocate GTTs to it. • Good idea – separate from default temp space which can be eaten up by ad-hoc queries – You must do this in PT8.54 • Oracle deliver scripts to create PSGTT01 • Specify tablespace as with any other record • But it must be a temporary tablespace • In 12c can have a temporary undo tablespace – Can avoid redo logging on undo on GTT PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 51
  • 50. GTT uses • Temporary Records in AE – Batch temporary table instances where restart disabled • Better with stand-alone AE than PSAESRV – All on-line temporary table instances • Can be implemented without code change • Reduction in – Redo – Read consistency – High Water Mark – full scans – RO contention with very frequent truncate PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 52
  • 51. GTTs in PT8.54 DROP TABLE PS_ST_RM2_TAO / CREATE GLOBAL TEMPORARY TABLE PS_ST_RM2_TAO (PROCESS_INSTANCE DECIMAL(10) NOT NULL, EMPLID VARCHAR2(11) NOT NULL, GRANT_NBR VARCHAR2(10) NOT NULL, VEST_DT DATE, SHARES_REMAINDER DECIMAL(21, 9) NOT NULL, DEC_PLACES SMALLINT NOT NULL) ON COMMIT PRESERVE ROWS TABLESPACE PSGTT01 / CREATE UNIQUE iNDEX PS_ST_RM2_TAO ON PS_ST_RM2_TAO (PROCESS_INSTANCE, EMPLID, GRANT_NBR, VEST_DT) / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 53
  • 52. GTTs in PT8.54 • New DDL model select * from psddlmodel where statement_Type in(6,7); STATEMENT_TYPE PLATFORMID SIZING_SET PARMCOUNT -------------- ---------- ---------- ---------- MODEL_STATEMENT ------------------------------------------------------------------------ 6 2 0 0 CREATE GLOBAL TEMPORARY TABLE [TBNAME] ([TBCOLLIST]) ON COMMIT PRESERVE ROWS TABLESPACE [TBSPCNAME]; 7 2 0 0 CREATE [UNIQUE] INDEX [IDXNAME] ON [TBNAME] ([IDXCOLLIST]); PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 54
  • 53. A small problem! • Record name length limits – Normal records: 15 characters – Temporary record: 13 characters – GTTs: 11 characters • Because you can have 9999 non-shared instances – Makes no sense, will never have that many processes • So, cannot retrofit GTTs into some existing processes – Eg GP_GL_SEGTMP in GP_GL_PREP PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 55
  • 54. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 56 My Recommendation • GTTs are a welcome addition. • Long overdue. • Can bring significant benefits. • No code change required. • Just need to fix the 11 character limit
  • 55. Partitioning • Licenced feature of Oracle Enterprise Addition. • Break a table into smaller pieces – Certain data values only occur in certain pieces – Optimiser can eliminate partitions because it know required data cannot be found there. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 57
  • 56. Partitioning • From Oracle 11g Database VLDB and Partitioning Guide PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 58
  • 57. Partitioning prior to 8.54 PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 59 • I have to declare an interest.
  • 58. Partitioning prior to 8.54 • I have been partitioning PeopleSoft since PT7.54 and Oracle 8i • It does not invalidate your support – (not the same as E-Business Suite!) • I have created a utility to build partition DDL script – Managing Oracle Table Partitioning in PeopleSoft A pplications with GFC_PSPART Package • http://www.go-faster.co.uk/gfc_pspart.manual.pdf PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 60
  • 59. Has Oracle shot my fox? • Is my partitioning utility obsolete? • How do I retrofit existing partitioning in PeopleTools? PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 61
  • 60. Example 1: Range Partitioning PSWORKLIST • Range Partition PSWORKLIST – On INSTSTATUS column • Partition on Statuses 0 and 1 – Small – current active items • Partition on Statuses 2 and 3 – Large – historical closed items – Application frequently uses WHERE INSTSTATUS<2 PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 62 INSTSTATUS Description 0 Available 1 Selected 2 Worked 3 Cancelled
  • 61. Partitioning Utility Component • PeopleTools►Utilities ►Partitioning Utility PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 63
  • 62. Partitioning Utility Component • Can only specify key columns as partition key columns. – Can customise PPMU_RECKEYS_VW SELECT A.RECNAME ,A.FIELDNAME FROM PSRECFIELDALL A /* WHERE %DecMult(%Round(%DECDIV(A.USEEDIT,2),0 ) , 2) <> A.USEEDIT*/ , PSDBFIELD B WHERE A.FIELDNAME = B.FIELDNAME AND B.FIELDTYPE IN(0,2,3,4,5,6) PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 64
  • 63. Partitioning Utility Component PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 65
  • 64. Partitioning Utility Component • Tablespace name not mandatory – but TABLESPACE keyword present. • MAXVALUE partition added automatically. • Fixed 20% free space specified • Row Movement always enabled • Cannot control – Name of MAXVALUE partition – Tablespace of MAXVALUE partition – Physical attributes of any partition – eg PCTFREE PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 66
  • 65. Partition DDL in Application Designer • Tools ► Data Administration ► Partitioning • Local index DDL not valid PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 67
  • 66. DDL Script problems CREATE INDEX PSBPSWORKLIST ON PSWORKLIST (OPRID, INSTSTATUS) PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 40960 NEXT 106496 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "PSINDEX" / ALTER INDEX PSBPSWORKLIST NOPARALLEL LOGGING / CREATE INDEX PSBWORKLIST ON PSWORKLIST ('') LOCAL TABLESPACE PTTBL / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 68
  • 67. Partitioning Utility Component PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 69
  • 68. Partitioning Utility Component • Meta-data not retained • DDL Stored in CLOB in – PS_PTTBLPARTDDL – PS_PTIDXPARTDDL • Other attributes are not stored – They were typed into a derived work record • This isn’t going to help when I add/split/compress/remove partitions PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 70
  • 69. Not integrated into Application Designer • Data Management Guide►Administering Databases on Oracle►Appendix E • "Record and index partitioning is not migrated as part of the IDE project. If you want to migrate the partitioning metadata along with the record, you will need to…" copy it yourself and it goes on to recommend creating a Data Migration Project in the Data Migration Workbench" PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 71
  • 70. Example 2: Import Existing Partitioning CREATE TABLE sysadm.psworklist (busprocname VARCHAR2(30) NOT NULL … ,descr254_mixed VARCHAR2(254) NOT NULL ) TABLESPACE PTTBL PCTFREE 10 PCTUSED 80 PARTITION BY RANGE(INSTSTATUS) (PARTITION psworklist_select_open VALUES LESS THAN ('2') ,PARTITION psworklist_worked_canc VALUES LESS THAN (MAXVALUE) PCTFREE 1 PCTUSED 90 ) ENABLE ROW MOVEMENT PARALLEL NOLOGGING / … ALTER TABLE sysadm.psworklist LOGGING NOPARALLEL MONITORING / … CREATE INDEX sysadm.ps0psworklist ON sysadm.psworklist (transactionid ,busprocname ,activityname ,eventname ,worklistname ,instanceid ) TABLESPACE PSINDEX PCTFREE 10 PARALLEL NOLOGGING / … CREATE INDEX sysadm.psbpsworklist ON sysadm.psworklist (oprid ,inststatus ) LOCAL (PARTITION psworklistbselect_open ,PARTITION psworklistbworked_canc PCTFREE 1 ) TABLESPACE PSINDEX PCTFREE 10 PARALLEL NOLOGGING / ALTER INDEX sysadm.psbpsworklist LOGGING / ALTER INDEX sysadm.psbpsworklist NOPARALLEL / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 72 Script created by GFC_PSPART utility
  • 71. Import DDL from Oracle Catalogue PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 73
  • 72. Example 3: Partitioning in GP_RSLT_ACUM • Main payroll result table – I have seen systems with >1 billion rows – Range partition on EMPLID – Sub-partition in CAL_RUN_ID • Partitioning utility – Cannot specify tablespace on sub-partition template – So swapped partition keys PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 74
  • 73. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 75
  • 74. Generated DDL uses template syntax PARTITION BY RANGE (CAL_RUN_ID) SUBPARTITION BY RANGE (EMPLID) SUBPARTITION TEMPLATE ( SUBPARTITION SUB1 VALUES LESS THAN ('K9999999999'), SUBPARTITION SUB2 VALUES LESS THAN ('KE999999999'), SUBPARTITION SUB3 VALUES LESS THAN ('KM999999999'), SUBPARTITION SUB4 VALUES LESS THAN ('KT999999999') , SUBPARTITION PE_MAXVALUE VALUES LESS THAN (MAXVALUE) ) ( PARTITION STRM1 VALUES LESS THAN ('K9999999999') TABLESPACE GPPART1, PARTITION STRM2 VALUES LESS THAN ('KE999999999') TABLESPACE GPPART2, PARTITION STRM3 VALUES LESS THAN ('KM999999999') TABLESPACE GPPART3, PARTITION STRM4 VALUES LESS THAN ('KT999999999') TABLESPACE GPPART4, PARTITION PE_MAXVALUE VALUES LESS THAN (MAXVALUE) TABLESPACE GPPART4 ) PCTFREE 20 ENABLE ROW MOVEMENT PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 76
  • 75. Partitioning in Global Payroll • In GP with GB extensions – 45 similarly range partitioned tables – 2 – 6 of which are sub partitioned • I want define a single partitioning strategy – Apply it to 45 tables. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 77
  • 76. My opinion • This utility doesn’t help me manage a complex partitioning strategy over time. • I had expected an extension to the structured metadata in the PeopleTools tables. – None of the attributes that I enter are stored. They are lost when I leave the component. – What we have is a one time DDL generator, and then we store the DDL • The partitioning utility component doesn’t do much I can’t do with a text editor PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 78
  • 77. %SQLHint Meta-SQL • Processed after all other expansions and meta-SQL – Searches SQL string – finds nth occurrence of SQL keword – Inserts a string after it • Particularly effective with %InsertSelect() meta- SQL. • Advantage for Oracle’s own developers – Platform specific hints PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 79
  • 78. Prior to 8.54 • This is how to hint %InsertSelect %InsertSelect(DISTINCT, DMK,JOB J, EMPLID= /*+LEADING(J)*/ J.EMPLID) FROM PS_JOB J • This example shows why it can fail – The hint is in the wrong place INSERT INTO PS_DMK (EMPLID, EMPL_RCD, EFFDT, EFFSEQ, SETID_DEPT, DEPTID) SELECT DISTINCT /*+LEADING(J)*/ J.EMPLID, J.EMPL_RCD, J.EFFDT, J.EFFSEQ, J.SETID_DEPT, J.DEPTID FROM PS_JOB J … PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 80
  • 79. Contrived Example %SqlHint(INSERT,1,'/*+APPEND*/',ORACLE,ENABLE) %SqlHint(INSERT,1,'/*Developer Comment*/',ORACLE,DISABLE) %SqlHint(SELECT,1,'/*+LEADING(J)*/',ORACLE) %SqlHint(SELECT,2,'/*+UNNEST(J1)*/',ORACLE) %SqlHint(SELECT,3,'/*+UNNEST(J2)*/',ORACLE) %InsertSelect(DISTINCT, DMK,JOB J) FROM PS_JOB J WHERE %Sql(DMK_CURJOB,JOB,J,J1,J2) PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 81 SQL object that contains EFFDT and EFFSEQ subqueries Insert in Direct Path Mode Disabled Hint is a nice way to get a comment into the code but not the SQL Leading hint in main query Unnest hints into sub-query in SQL object
  • 80. Result of Contrived Example INSERT /*+APPEND*/ INTO PS_DMK (EMPLID , EMPL_RCD , EFFDT , EFFSEQ , SETID_DEPT , DEPTID) SELECT /*+LEADING(J)*/ DISTINCT J.EMPLID , J.EMPL_RCD , J.EFFDT , J.EFFSEQ , J.SETID_DEPT , J.DEPTID FROM PS_JOB J WHERE J.EFFDT = ( SELECT /*+UNNEST(J1)*/ MAX(J1.EFFDT) FROM JOB J1 WHERE J1.EMPLID = J.EMPLID AND J1.EMPL_RCD = J.EMPL_RCD AND J1.EFFDT <= TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY-MM-DD')) AND J.EFFSEQ = ( SELECT /*+UNNEST(J2)*/ MAX(J2.EFFSEQ) FROM JOB J2 WHERE J2.EMPLID = J.EMPLID AND J2.EMPL_RCD = J.EMPL_RCD AND J2.EFFDT = J.EFFDT) PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 82
  • 81. Plan Stability in Oracle • Oracle has various technologies to control execution plan – SQL Outlines – SQL Profiles – SQL Patches – SQL Baselines • Application Engine can defeat these – Different temporary table instances – Dynamic code – Migration of plan stability with code changes PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 83
  • 82. Conclusion • Excellent new feature • Simple • Effective • I look forward to hint the places that other techniques cannot reach! PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 84
  • 83. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 85
  • 84. %SelectDummyTable Meta-SQL • Simply evaluates to DUAL • Dual is a convenience table that provides a single row – PeopleSoft often uses PS_INSTALLATION – Dual is not a table, but a memory structure • It doesn’t even require a logical read. – Removes risk that PS_INSTALLATION has 0 or many rows. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 86
  • 85. Example • Instead of (see ESPP_REF_REVMAIN.PSHUP.Do When) %Select(IF_FLAG) SELECT 'X' FROM PS_INSTALLATION WHERE %Bind(ST_SEND_SRC) = 'N' • Code this %Select(IF_FLAG) SELECT 'X' FROM %SelectDummyTable WHERE %Bind(ST_SEND_SRC) = 'N' • Which resolves to %Select(IF_FLAG) SELECT 'X' FROM DUAL WHERE %Bind(ST_SEND_SRC) = 'N' PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 87
  • 86. Conclusion • Small, simple improvement • I would not change code just to get this in, but I would use it going forward PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 88
  • 87. Multiple Security Records • This is new behaviour in PeopleTools 8.54 – that could impact database performance • Release notes: – “PeopleTools has added an Advanced Query Security option to Application Designer. This feature allows up to five Query Security Records to be associated with a single record, including the ability to associate security with non-key fields. – “While powerful, this feature should be used sparingly because multiple additional joins will affect query performance.” PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 89
  • 88. • Security record joined in query by key columns in common Query Security prior to PT8.54 PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 90
  • 89. PS/Query SQL SELECT B.EMPLID, B.DEPTID FROM PS_JOB B, PS_EMPLMT_SRCH_QRY B1, PS_NAMES A, PS_PERALL_SEC_QRY A1 WHERE ( B.EMPLID = B1.EMPLID AND B.EMPL_RCD = B1.EMPL_RCD AND B1.OPRID = 'PS' AND A.EMPLID = A1.EMPLID AND A1.OPRID = 'PS' AND ( B.EFFDT = (SELECT MAX(B_ED.EFFDT) FROM PS_JOB B_ED WHERE B.EMPLID = B_ED.EMPLID AND B.EMPL_RCD = B_ED.EMPL_RCD AND B_ED.EFFDT <= SYSDATE) AND B.EFFSEQ = (SELECT MAX(B_ES.EFFSEQ) FROM PS_JOB B_ES WHERE B.EMPLID = B_ES.EMPLID AND B.EMPL_RCD = B_ES.EMPL_RCD AND B.EFFDT = B_ES.EFFDT) AND B.EMPLID = A.EMPLID AND A.EFFDT = (SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED WHERE A.EMPLID = A_ED.EMPLID AND A.NAME_TYPE = A_ED.NAME_TYPE AND A_ED.EFFDT <= SYSDATE) )) PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 91 Join on key columns in common Multiple query security records often cause performance problems
  • 90. Multiple Query Security records • Can specify join columns – Stored in PSRECSECFLDMAPS. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 92
  • 91. PS/Query with multiple security records SELECT B.EMPLID, B.DEPTID FROM PS_JOB B, PS_EMPLMT_SRCH_QRY B1, PS_EMPLMT_SRCH_QRY B4, PS_PERALL_SEC_QRY B5, PS_PERS_SRCH_QRY B6, PS_NAMES A, PS_PERALL_SEC_QRY A1 WHERE ( B.EMPLID = B1.EMPLID AND B.EMPL_RCD = B1.EMPL_RCD AND B1.OPRID = 'PS' AND B.EMPLID = B4.EMPLID AND B.EMPL_RCD = B4.EMPL_RCD AND B4.OPRID = 'PS' AND B.EMPLID = B5.EMPLID AND B5.OPRID = 'PS' AND B.EMPLID = B6.EMPLID AND B6.OPRID = 'PS' AND A.EMPLID = A1.EMPLID AND A1.OPRID = 'PS' AND ( B.EFFDT = (SELECT MAX(B_ED.EFFDT) FROM PS_JOB B_ED WHERE B.EMPLID = B_ED.EMPLID AND B.EMPL_RCD = B_ED.EMPL_RCD AND B_ED.EFFDT <= SYSDATE) AND B.EFFSEQ = (SELECT MAX(B_ES.EFFSEQ) FROM PS_JOB B_ES WHERE B.EMPLID = B_ES.EMPLID AND B.EMPL_RCD = B_ES.EMPL_RCD AND B.EFFDT = B_ES.EFFDT) AND B.EMPLID = A.EMPLID AND A.EFFDT = (SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED WHERE A.EMPLID = A_ED.EMPLID AND A.NAME_TYPE = A_ED.NAME_TYPE AND A_ED.EFFDT <= SYSDATE) )) PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 93 A1 & B1 are original query security records B4, B5 and B6 are new query security records EMPLMT_SRCH_QRY was joined twice
  • 92. Conclusion • Multiple query security records can be cause of performance problems – Must be serious if the release notes mentions it. – Useful if joining security on non-key field – Otherwise I might prefer to merge security views PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 94
  • 93. Oracle Resource Manager • Resource Manager – Restricting sessions – Prioritising one database session over another • Resource Plan – Set of rules applied to some or all sessions – Must reflect business priorities – Requires careful design PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 95
  • 94. Oracle Resource Manager in PeopleTools 8.54 PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 96
  • 95. PeopleSoft Executable →Resource Map • At process startup lookup process on PS_PTEXEC2RESOURCE SELECT PT_ORA_CONSUMR_GRP FROM PS_PT_ORA_RESOURCE , PS_PTEXEC2RESOURCE WHERE PT_EXECUTABLE_NAME = 'PSAPPSRV' AND PT_ORA_CONSUMR_GRP <> ' ' AND PS_PT_ORA_RESOURCE.PT_RESOURCE_NAME = PS_PTEXEC2RESOURCE.PT_RESOURCE_NAME PT_ORA_CONSUMR_GRP ------------------------ INTERACTIVE_GROUP • And then explicity switch group PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 97
  • 96. PS_PTEXEC2RESOURCE Mappings • I question one or two of the mappings on PS_PTEXEC2RESOURCE – Which you could change SELECT * FROM PS_PTEXEC2RESOURCE … PT_EXECUTABLE_NAME PT_RESOURCE_NAME -------------------------------- ------------------ … PSAPPSRV APPLICATION SERVER PSNVS MISCELLANEOUS PSQED MISCELLANEOUS PSQRYSRV QUERY SERVER … PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 98
  • 97. Oracle Resource Manager • Explicit switch overrides any automatic switches by session attribute. • Cannot mix – PeopleSoft Consumer Groups & – Oracle Consumer Group Mappings • Eg. By MODULE/ACTION • Resource group for a particular component • Would have to delete mapping from PS_PTEXEC2RESOURCE PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 99
  • 98. Consumer Group Mapping BEGIN DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA(); DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING (attribute => 'MODULE_NAME' ,value => 'PROCESSMONITOR' ,consumer_group => 'SYS_GROUP'); DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA(); END; / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 100
  • 99. Consumer Group Mapping Priority BEGIN DBMS_RESOURCE_MANAGER.set_consumer_group_mapping_pri ( explicit => 1, oracle_user => 2, service_name => 3, client_os_user => 4, client_program => 5, client_machine => 6, module_name_action => 7, module_name => 8, service_module_action => 9, service_module => 10 ); END; / PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 101 Explicit must be priority 1
  • 100. Conclusion • A good start, but need more granularity. • Specify consumer group by – Specific scheduled process – Application server domain • Eg PIA –v- IB –v- nVision • Eg. Back office –v- Self Service – Useful on RAC – Essential on Multi-tenant PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 102
  • 101. Performance Monitor enhancements • Transaction history component search – Multiple systems – Multiple transaction types • Tuxedo Queuing reported – Fixed in 8.53? • Improvements to Archive/Purge process • JMX support for connection to OEM? PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 103
  • 102. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 104
  • 103. EnableAEMonitoring • Application Engine Instrumentation – Calls to DBMS_APPPLICATION_INFO – Disabled by default from PT8.52.23 & PT8.53.13 • Performance degradation in DO LOOP processing – New Parameter to reenable • Oracle Bug 10130415 Latch contention on " resmgr group change latch“ – Fixed 11.2.0.3 PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 105
  • 104. New Parameter in psprcs.cfg • New Parameters to re-enable instrumentation. – This is highly recommended [Database Options] ;===================================================================== ==== ; Database-specific configuration options ;======================================================================= == … ;DMK - added to enable DBMS_APPLICATION_INFO instrumentation EnableAEMonitoring=1 PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 106
  • 105. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 107 Conclusion • Lots of new performance/management features in PT8.54 – Clear move away from platform agnosticism in favour of explicit support for Oracle RDBMS features. – Some have some rough edges – Some require more development • It will be a while before we see some of them used in delivered code. – We can start to use them now.
  • 107. PeopleTools 8.54 for the Oracle DBA ©2015 www.go-faster.co.uk 109 Conclusion • Lots of new performance/management features in PT8.54 – Clear move away from platform agnosticism in favour of explicit support for Oracle RDBMS features. – Some have some rough edges – Some require more development • It will be a while before we see some of them used in delivered code. – We can start to use them now.

Editor's Notes

  • #9: set autotrace off drop table t purge / create table t (name varchar2(30) not null ,padding varchar2(4000) ) / insert into t with x as ( select 'Adams' name, 4000 padlen from dual union all select 'Allen', 4000 from dual union all select 'Blake', 2000 from dual union all select 'Clark', 2000 from dual union all select 'Ford', 2000 from dual union all select 'James', 4000 from dual union all select 'Jones', 4000 from dual union all select 'King', 4000 from dual union all select 'Martin', 4000 from dual union all select 'Miller', 2000 from dual union all select 'Scott', 2000 from dual union all select 'Smith', 2000 from dual union all select 'Turner', 4000 from dual union all select 'Ward', 4000 from dual ) select name, rpad(name,padlen,'.') from x / create unique index ta on t(name, padding) / create unique index td on t(name DESC, padding) / set autotrace on alter session set optimizer_features_enable='8.0.3'; clear screen select /*+INDEX(T,TA)*/ name from t where name <= 'Clerk' / select /*+INDEX(T,TD)*/ name from t where name <= 'Clerk' / select /*+INDEX(T,TA)*/ MAX(name) from t where name <= 'Clerk' / select /*+INDEX(T,TD)*/ MAX(name) from t where name <= 'Clerk' / clear screen select /*+INDEX(T,TA)*/ MAX(name) from t where name <= 'Turner' / select /*+INDEX(T,TD)*/ MAX(name) from t where name <= 'Turner' /
  • #50: Global because the content is private Temporary because the definition is permanent