We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byCarson Sparkman
Modified over 2 years ago
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk1 PeopleTools 8.48/8.49 New Database Features David Kurtz Go-Faster Consultancy Ltd. email@example.com www.go-faster.co.uk
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk2 Oracle Database Specialist –Independent consultant System Performance tuning –PeopleSoft ERP –Oracle RDBMS Book –www.psftdba.com Who Am I?
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk3 UK Oracle User Group UKOUG –PeopleSoft Director Annual Conference –Birmingham UK –1-5 December 2008 Call for Papers is open –http://conference.ukoug.org
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk4 Introduction The book deals with PeopleTools 8.44. –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© www.go-faster.co.uk5 Agenda DDL Models & %UpdateStats NOLOGGING Column Default Values Long Columns, Unicode & CLOBs Descending Indexes Dirty Read (PT8.49, SQLServer)
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk6 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 –www.go-faster.co.ukwww.go-faster.co.uk Notes pages include references to my blog –blog.psftdba.comblog.psftdba.com Errata and Addenda for the book can be found at www.psftdba.com www.psftdba.com
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk7 %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© www.go-faster.co.uk8 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© www.go-faster.co.uk9 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© www.go-faster.co.uk10 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© www.go-faster.co.uk11 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© www.go-faster.co.uk12 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© www.go-faster.co.uk13 PeopleSoft workaround to handle locked statistics DBMS_STATS.GATHER_TABLE_STATS raises ORA-20005 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 http://blog.psftdba.com/2007/05/updatestats-v-optimizer- dynamic.html.http://blog.psftdba.com/2007/05/updatestats-v-optimizer- dynamic.html
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk14 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 # 134419) 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© www.go-faster.co.uk15 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© www.go-faster.co.uk16 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© www.go-faster.co.uk17 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© www.go-faster.co.uk18 Record Properties And then fields defaults appear in create table DDL. –Some of them. Mobile Synchronisation Framework
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk19 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© www.go-faster.co.uk20 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© www.go-faster.co.uk21 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© www.go-faster.co.uk22 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© www.go-faster.co.uk23 Unicode Uses Character Semantics Reduces parse problem … EMPLID VARCHAR2(11 CHAR)… –Except that the ‘char’ is assumed
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk24 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© www.go-faster.co.uk25 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© www.go-faster.co.uk26 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© www.go-faster.co.uk27 Experiment 1: Populate tables only one hard parse Only one hard parse BEGIN FOR i IN 1..10000 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© www.go-faster.co.uk28 Results of Experiment 1 Insert 10000 rows Elapsed time: –No constraints: 5.36s –With constraints:5.79s –Character semantics:5.11s
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk29 Experiment 2 Now deliberately generate different SQL statements, forcing parse every time. BEGIN FOR i IN 1..1000 LOOP EXECUTE IMMEDIATE 'INSERT INTO test_nocons VALUES ('||i||',RPAD(TO_CHAR('||i||'),11,''.''))'; END LOOP; COMMIT; END; /
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk30 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© www.go-faster.co.uk31 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© www.go-faster.co.uk32 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© www.go-faster.co.uk33 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© www.go-faster.co.uk34 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© www.go-faster.co.uk35 Descending Indexes Removed in PeopleTools 8.14/8.15 –Bug 869177 in Oracle 8i –ORA-03113 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© www.go-faster.co.uk36 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© www.go-faster.co.uk37 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© www.go-faster.co.uk38 Questions?
Collaborate08 PeopleTools 8.48/9© www.go-faster.co.uk39 PeopleTools 8.48/8.49 New Database Features David Kurtz Go-Faster Consultancy Ltd. firstname.lastname@example.org www.go-faster.co.uk
UKOUG DBMS SIG www.go-faster.co.uk1 Materialized Views: Simple Replication? David Kurtz Go-Faster Consultancy Ltd.
PeopleSoft Ping David Kurtz Go-Faster Consultancy Ltd.
PIA Load Balancing, JVMs and Garbage Collection David Kurtz Go-Faster Consultancy Ltd.
1 Further Experiences of Global Temporary Tables in Oracle 8.1 David Kurtz Go-Faster Consultancy Ltd.
1 An introduction to SQL*Trace, TKPROF and Execution Plans 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
Graphing AWR Data in Excel David Kurtz Go-Faster Consultancy Ltd.
Unicode Oddity. from a Unicode PeopleSoft Database SELECT emplid, name, LENGTH(name), BLENGTH(name) FROMps_personal_data WHEREemplid = '007’ ; EMPLID.
Introduction to SQL Tuning Brown Bag Three essential concepts.
Row Migration can Aggravate Contention on Cache Buffer Chains Latch David Kurtz Go-Faster Consultancy Ltd.
Good Salespeople johnpc ltd: John Cunningham.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Global Payroll Performance Optimisation - I David Kurtz Go-Faster Consultancy Ltd.
Pitching for finance Social Enterprise North West February 2014.
11 Copyright © Oracle Corporation, All rights reserved. Managing Tables.
9 Copyright © 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
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.
SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.
© 2001 empolis UK1 Topic Maps, NewsML and XML: Possible Integration and Implementations. By Soelwin Oo.
Go-Faster Consultancy Ltd.1 Experiences of Global Temporary Tables in Oracle 8.1 David Kurtz Go-Faster Consultancy Ltd.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
9 Creating and Managing Tables. Objectives After completing this lesson, you should be able to do the following: Describe the main database objects Create.
SQL DDL QUERIES CS 260 Database Systems. Introduction to DDL Data Definition Language (DDL) Used to create and modify database objects In contrast.
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,
Data Definition Language (DDL). DDL Data Definition Language is used to define the structure of the database. DDL commands are auto committed i.e. the.
Partition, Compress, Archive and Purge Keep Your System on the Road David Kurtz Go-Faster Consultancy Ltd.
1 PeopleSoft for the DBA David Kurtz Go-Faster Consultancy Ltd.
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.
Week 4 Lecture 2 Advanced Table Management. Learning Objectives Create tables with large object (LOB) columns and tables that are index-organized
PeopleSoft Instrumentation © PeopleSoft: A Properly Instrumented Application? David Kurtz Go-Faster Consultancy Ltd.
1 CS 430 Database Theory Winter 2005 Lecture 16: Inside a DBMS.
© All rights reserved. U.S International Tech Support
SQL Fundamentals SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Using the SQL Access Advisor
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
1 SQL Best Coding Practice in PeopleTools 7.x David Kurtz Go-Faster Consultancy Ltd.
DATABASE CHAPTERS. DATA TYPES Data type selection is usually dictated by nature of data and by intended use MySQL Supported data type categories: Numeric.
CHAPTER 4 Tablespaces and Datafiles. Introduction After installing the binaries, creating a database, and configuring your environment, the next logical.
1 Tuning with Oracle’s SQL Trace David Kurtz Go-Faster Consultancy Ltd.
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.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Database Basics.
CC SQL Utilities. CC SQL Utilities Overview The Primary tech tool used for viewing and changing data directly in the database The Primary tech tool used.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Week 7 : Chapter 7 Agenda Maintenance Plan: Why do maintenance? Overview Maintenance Plan wizard DBCC maintenance commands.
An Overview of GoldenGate Replication Brian Keating December 31, 2009.
Password Management for Oracle8 Ari Kaplan Independent Consultant.
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.
Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
© 2017 SlidePlayer.com Inc. All rights reserved.