Collaborate08 PeopleTools 8.48/9© PeopleTools 8.48/8.49 New Database Features David Kurtz Go-Faster Consultancy Ltd.

Slides:



Advertisements
Similar presentations
Using the SQL Access Advisor
Advertisements

B3: Putting OpenEdge Auditing to Work: Dump and Load with (Almost) No Downtime David EDDY Senior Solution Consultant.
SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.
Data Definition and Integrity Constraints
CHAPTER 4 Tablespaces and Datafiles. Introduction After installing the binaries, creating a database, and configuring your environment, the next logical.
1 SQL Best Coding Practice in PeopleTools 7.x David Kurtz Go-Faster Consultancy Ltd.
1 SQL Best Coding Practice in PeopleTools 7.x David Kurtz Go-Faster Consultancy Ltd.
What the Search Engines are up to Now: same ingredients different recipes Karen Blakeman RBA Information Services, UK 02 June 20141Karen Blakeman
PeopleSoft Ping David Kurtz
Introduction to SQL Tuning Brown Bag Three essential concepts.
Database Performance Tuning and Query Optimization
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
An Overview of GoldenGate Replication Brian Keating December 31, 2009.
A Guide to Oracle9i1 Creating and Modifying Database Tables Chapter 2.
11 Copyright © Oracle Corporation, All rights reserved. Managing Tables.
9 Copyright © 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
9 Creating and Managing Tables. Objectives After completing this lesson, you should be able to do the following: Describe the main database objects Create.
Partition, Compress, Archive and Purge Keep Your System on the Road David Kurtz Go-Faster Consultancy Ltd.
Go-Faster Consultancy Ltd.1 Experiences of Global Temporary Tables in Oracle 8.1 David Kurtz Go-Faster Consultancy Ltd.
1 Further Experiences of Global Temporary Tables in Oracle 8.1 David Kurtz Go-Faster Consultancy Ltd.
Data Definition Language (DDL)
CC SQL Utilities.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Creating Tables. 2 home back first prev next last What Will I Learn? List and provide an example of each of the number, character, and date data types.
UKOUG DBMS SIG www.go-faster.co.uk1 Materialized Views: Simple Replication? David Kurtz Go-Faster Consultancy Ltd.
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
© 2001 empolis UK1 Topic Maps, NewsML and XML: Possible Integration and Implementations. By Soelwin Oo.
PeopleSoft Instrumentation © PeopleSoft: A Properly Instrumented Application? David Kurtz Go-Faster Consultancy Ltd.
Debates in HE ASS 3. Aims To describe development of HE post- war To analyse the “widening participation” debate.
Pitching for finance Social Enterprise North West February 2014.
Good Salespeople johnpc ltd: John Cunningham.
Graphing AWR Data in Excel
Global Payroll Performance Optimisation - I David Kurtz Go-Faster Consultancy Ltd.
1 PeopleSoft for the DBA David Kurtz Go-Faster Consultancy Ltd.
Password Management for Oracle8 Ari Kaplan Independent Consultant.
Database Chapters.
WaveMaker Visual AJAX Studio 4.0 Training
Oracle Hyperion Financial Data Quality Management Considerations for a scaled, expedited and integrated approach on data quality NCOAUG – Aug 15, 2008.
SQL*Fingerprints David Kurtz
PIA Load Balancing, JVMs and Garbage Collection David Kurtz Go-Faster Consultancy Ltd.
An introduction to SQL*Trace, TKPROF and Execution Plans
Prligence Empowering Intelligence A Multi-Source Time-Variant Datawarehouse Case Study Session# by Arup Nanda Proligence, Inc. Norwalk, CT.
1 Tuning with Oracle’s SQL Trace David Kurtz Go-Faster Consultancy Ltd.
Row Migration can Aggravate Contention on Cache Buffer Chains Latch David Kurtz Go-Faster Consultancy Ltd.
Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
SQL’s Data Definition Language (DDL) n DDL statements define, modify and remove objects from data dictionary tables maintained by the DBMS n Whenever you.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
Database Design for DNN Developers Sebastian Leupold.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Unicode Oddity. from a Unicode PeopleSoft Database SELECT emplid, name, LENGTH(name), BLENGTH(name) FROMps_personal_data WHEREemplid = '007’ ; EMPLID.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
Sizing Basics  Why Size?  When to size  Sizing issues:  Bits and Bytes  Blocks (aka pages) of Data  Different Data types  Row Size  Table Sizing.
1 CS 430 Database Theory Winter 2005 Lecture 16: Inside a DBMS.
® IBM Software Group © 2005 IBM Corporation © IBM Corporation 2004 Informix Table Level Point in Time Restore for IDS and XPS John F. Miller III.
PL / SQL By Mohammed Baihan. What is PL/SQL? PL/SQL stands for Procedural Language extension of SQL. PL/SQL is a combination of SQL along with the procedural.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
© All rights reserved. U.S International Tech Support
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
Week 4 Lecture 2 Advanced Table Management. Learning Objectives  Create tables with large object (LOB) columns and tables that are index-organized 
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
Sql DDL queries CS 260 Database Systems.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
1 11g NEW FEATURES ByVIJAY. 2 AGENDA  RESULT CACHE  INVISIBLE INDEXES  READ ONLY TABLES  DDL WAIT OPTION  ADDING COLUMN TO A TABLE WITH DEFAULT VALUE.
8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.
Agenda for Today  DATABASE Definition What is DBMS? Types Of Database Most Popular Primary Database  SQL Definition What is SQL Server? Versions Of SQL.
Oracle Database High Availability
Oracle Database High Availability
DATABASE MANAGEMENT SYSTEM
Presentation transcript:

Collaborate08 PeopleTools 8.48/9© PeopleTools 8.48/8.49 New Database Features David Kurtz Go-Faster Consultancy Ltd.

Collaborate08 PeopleTools 8.48/9© Oracle Database Specialist –Independent consultant System Performance tuning –PeopleSoft ERP –Oracle RDBMS Book – Who Am I?

Collaborate08 PeopleTools 8.48/9© UK Oracle User Group UKOUG –PeopleSoft Director Annual Conference –Birmingham UK –1-5 December 2008 Call for Papers is open –

Collaborate08 PeopleTools 8.48/9© Introduction The book deals with PeopleTools –The presentation is the addenda and errata PeopleTools 8.44 was a major release –Instrumentation PeopleTools 8.48 –‘Fusion readiness’, integration and messaging, –some significant database features PeopleTools 8.49 –New third party versions

Collaborate08 PeopleTools 8.48/9© Agenda DDL Models & %UpdateStats NOLOGGING Column Default Values Long Columns, Unicode & CLOBs Descending Indexes Dirty Read (PT8.49, SQLServer)

Collaborate08 PeopleTools 8.48/9© Resources If you can’t hear me say so now. Please feel free to ask questions as we go along. The presentation will be available from –in the conference library – Notes pages include references to my blog –blog.psftdba.comblog.psftdba.com Errata and Addenda for the book can be found at

Collaborate08 PeopleTools 8.48/9© %UpdateStats Genuine challenge in any RDBMS with a Cost-base optimizer –What do I do about statistics on a working storage table? Platform generic solution: –Collect statistics in the program after you populate the table.

Collaborate08 PeopleTools 8.48/9© DDL Models From PT8.x, on Oracle, %UpdateStats uses two new DDL models –Up to PT8.47 ANALYZE TABLE [TBNAME] COMPUTE STATISTICS; ANALYZE TABLE [TBNAME] ESTIMATE STATISTICS; Probably due to support for Oracle 8i up to PT8.44. –From PT8.48 Uses DBMS_STATS  Silly Defaults

Collaborate08 PeopleTools 8.48/9© Delivered DDL Model Estimate –Model 4 DBMS_STATS.GATHER_TABLE_STATS (ownname=>[DBNAME],tabname=>[TBNAME],estimate_percent=>1,method_opt=> 'FOR ALL COLUMNS SIZE 1',cascade=>TRUE); Compute –Model 5 DBMS_STATS.GATHER_TABLE_STATS (ownname=>[DBNAME],tabname=>[TBNAME],estimate_percent=> dbms_stats.auto_sample_size,method_opt=> 'FOR ALL INDEXED COLUMNS SIZE 1',cascade=>TRUE);

Collaborate08 PeopleTools 8.48/9© Delivered Models Estimate and Compute Confused Saved by 1% Sample Size for Compute  1% Sample Size for Compute –I think that’s a typo! DBMS_STATS.AUTO_SAMPLE_SIZE –Default in 10g. Good idea. Most of the time most people use an unnecessarily large sample size.  SIZE 1 –Oracle 9i default, removes histograms. –10g default is FOR ALL COLUMNS SIZE AUTO  ALL INDEXED COLUMNS SIZE 1 –Removes histograms from indexed columns –Leaves old histograms on unindexed columns

Collaborate08 PeopleTools 8.48/9© My suggested DDL Model Estimate –Model 4 DBMS_STATS.GATHER_TABLE_STATS (ownname=>[DBNAME],tabname=>[TBNAME],estimate_percent=> dbms_stats.auto_sample_size,method_opt=> 'FOR ALL COLUMNS SIZE AUTO',cascade=>TRUE); Compute –Model 5 DBMS_STATS.GATHER_TABLE_STATS (ownname=>[DBNAME],tabname=>[TBNAME],estimate_percent=>100,method_opt=> 'FOR ALL COLUMNS SIZE AUTO',cascade=>TRUE);

Collaborate08 PeopleTools 8.48/9© Optimizer Dynamic Sampling Oracle’s approach to same problem of statistics working storage tables –Delete the statistics –Have the database sample a few blocks at parse time. JIT ANALYZE Also effective with Global Temporary Tables –From 10g: Lock the statistics OPTIMIZER_DYNAMIC_SAMPLING = 4

Collaborate08 PeopleTools 8.48/9© PeopleSoft workaround to handle locked statistics DBMS_STATS.GATHER_TABLE_STATS raises ORA on table with locked statistics. %UpdateStats in Application Engine Also in COBOL –Need a PL/SQL procedure to encapsulate DBMS_STATS –Handle error in exception. –Call PL/SQL procedure in DDL model. See dynamic.html. dynamic.html

Collaborate08 PeopleTools 8.48/9© NOLOGGING operations Not written to the redo stream. –Operations do not appear in a Data Guard standby database You will get corrupt blocks ORA-01578: ORACLE data block corrupted (file # 1, block # ) ORA-01110: data file 1: '/u01/oradata/hcm89/system01.dbf‘ ORA-26040: Data block was loaded using the NOLOGGING option –Cannot recover objects on restore reapply archive logs after restoring backup

Collaborate08 PeopleTools 8.48/9© NOLOGGING in PeopleSoft From PeopleTools 8.48: Application Designer –builds all indexes PARALLEL NOLOGGING –Then alters them NOPARALLEL LOGGING Can remove NOLOGGING from DDL model  Alter statement is hard coded,  not in the DDL model

Collaborate08 PeopleTools 8.48/9© NOLOGGING in PeopleSoft Good idea in non-production environments. –Probably not in archive log mode anyway –Better index build performance  Bad in Production –Corrupt Blocks Simple Workaround ALTER DATABASE FORCE LOGGING;

Collaborate08 PeopleTools 8.48/9© Column Default Values Most columns in PeopleSoft are NOT NULL ORA-01400: cannot insert NULL into ("SYSADM"."table name"."field name") When a new column is added to a table –Need to visit all insert statements. Unless I could do this: DESCR VARCHAR2(30) DEFAULT ' ' NOT NULL, SEX VARCHAR2(1) DEFAULT 'U' NOT NULL,

Collaborate08 PeopleTools 8.48/9© Record Properties And then fields defaults appear in create table DDL. –Some of them. Mobile Synchronisation Framework

Collaborate08 PeopleTools 8.48/9© CREATE TABLE PS_DMK (EMPLID VARCHAR2(11) DEFAULT ' ' NOT NULL,EFFDT DATE,SEX VARCHAR2(1) DEFAULT 'U' NOT NULL,ACTION_DT DATE NOT NULL,ARRIVAL_TIME DATE NOT NULL,ACTION_DTTM DATE,AA_PLAN_YR SMALLINT DEFAULT 42 NOT NULL,ACCRUED_AMOUNT DECIMAL(15, 2) DEFAULT 0 NOT NULL) …

Collaborate08 PeopleTools 8.48/9© Column Default Values Only character and numeric literal defaults used as columns defaults.  Dates ignored. What I was hoping for was … ACTION_DT DATE DEFAULT TRUNC(SYSDATE) NOT NULL, ARRIVAL_TIME DATE DEFAULT SYSDATE NOT NULL, …

Collaborate08 PeopleTools 8.48/9© Long Columns & CLOBs Previously –Long Characters Columns become LONG columns Difficult to handle –Can’t use character functions –Trouble using across database links –Deprecated by Oracle RDBMS

Collaborate08 PeopleTools 8.48/9© Long Columns and CLOBs From PeopleTools 8.48: If PSSTATUS.DATABASE_OPTION = 2 –Long characters become CLOBs –Raw fields become BLOBs  Supported from Apps 9.0 only –Why not legacy apps on PT8.48?

Collaborate08 PeopleTools 8.48/9© Unicode Uses Character Semantics Reduces parse problem … EMPLID VARCHAR2(11 CHAR)… –Except that the ‘char’ is assumed

Collaborate08 PeopleTools 8.48/9© How did PeopleSoft used to create character columns? Byte semantics –3 bytes / character CREATE TABLE PS_JOB (EMPLID VARCHAR2(33)CHECK(LENGTH(EMPLID)<=11) … );

Collaborate08 PeopleTools 8.48/9© So... Length checking constraint on EVERY character column in the database! >500,000 user constraints in a Financials database What effect does this have on performance?

Collaborate08 PeopleTools 8.48/9© Experiment create table test_nocons (id number,field_01 varchar2(30) …,field_20 varchar2(30) ); create table test_nocons_char (id number,field_01 varchar2(30 char) …,field_20 varchar2(30 char) ); create table test_cons (id number,field_01 varchar2(90) CHECK(LENGTH(field_01)<=30 ) …,field_20 varchar2(90) CHECK(LENGTH(field_01)<=30 ) );

Collaborate08 PeopleTools 8.48/9© Experiment 1: Populate tables only one hard parse Only one hard parse BEGIN FOR i IN LOOP INSERT INTO test_nocons VALUES (i,RPAD(TO_CHAR(i),11,'.') …,RPAD(TO_CHAR(i),30,'.')); COMMIT; END LOOP; END; /

Collaborate08 PeopleTools 8.48/9© Results of Experiment 1 Insert rows Elapsed time: –No constraints: 5.36s –With constraints:5.79s –Character semantics:5.11s

Collaborate08 PeopleTools 8.48/9© Experiment 2 Now deliberately generate different SQL statements, forcing parse every time. BEGIN FOR i IN LOOP EXECUTE IMMEDIATE 'INSERT INTO test_nocons VALUES ('||i||',RPAD(TO_CHAR('||i||'),11,''.''))'; END LOOP; COMMIT; END; /

Collaborate08 PeopleTools 8.48/9© Results of Experiment 2 >90% parse time Elapsed Time: –Without Constraints: 14.71s –With Constraints: 37.01s –Character Semantics:11.57s

Collaborate08 PeopleTools 8.48/9© PeopleSoft Implications  Application Engine programs resolve binds to literals by default  You can override this by customisation REUSE STATEMENT  Financials is more severely effected because it has more character columns –So more entries on cons$ to scan

Collaborate08 PeopleTools 8.48/9© Conclusion Execution of constraints adds overhead, but not a huge amount. Parse overhead of constraints is very severe. –Tracing shows that they keep scanning cons$ Character semantics are a good thing They even seem to work better than byte semantics without constraints!

Collaborate08 PeopleTools 8.48/9© But there is a catch! Like CLOBs this feature is controlled by –PSSTATUS.DATABASE_OPTION = 2  Only supported from Applications 9.

Collaborate08 PeopleTools 8.48/9© Descending Indexes SELECT EMPLID,... FROM PS_JOB WHERE EMPLID=:1 AND EMPL_RCD=:2 ORDER BY EMPLID, EMPL_RCD, EFFDT DESC, EFFSEQ DESC

Collaborate08 PeopleTools 8.48/9© Descending Indexes Removed in PeopleTools 8.14/8.15 –Bug in Oracle 8i –ORA Reintroduced in PeopleTools 8.48 Increase in performance of effective date/sequence queues. –Usually ask for max or current (max <= today) –Search from latest record back instead of earliest record forwards –Can be lots of history and not much future Often current is latest –Don’t have to scan all of history

Collaborate08 PeopleTools 8.48/9© Descending Index Form of Function Based Index –Hidden Column –System Generated Name Eg. SYS_NC00164$ appears in USER_IND_COLUMNS –USER_IND_EXPRESSIONS Translation of column to expression

Collaborate08 PeopleTools 8.48/9© Dirty Read PT8.49, PSQRYSRV on SQLServer Oracle doesn’t do dirty reads because it has multi-versioning supported by Undo (Rollback) Segments –SQL Server 2000 provided read committed mode by locking queried data –SQL Server 2005 has multi-versioning option (similar effect to Oracle) If you have upgraded to PT8.49 why haven’t you upgraded to SQL Server 2005?

Collaborate08 PeopleTools 8.48/9© Questions?

Collaborate08 PeopleTools 8.48/9© PeopleTools 8.48/8.49 New Database Features David Kurtz Go-Faster Consultancy Ltd.