Partition, Compress, Archive and Purge Keep Your System on the Road David Kurtz Go-Faster Consultancy Ltd.

Slides:



Advertisements
Similar presentations
Using the SQL Access Advisor
Advertisements

Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Variations of the Turing Machine
3rd Annual Plex/2E Worldwide Users Conference 13A Batch Processing in 2E Jeffrey A. Welsh, STAR BASE Consulting, Inc. September 20, 2007.
AP STUDY SESSION 2.
1
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Processes and Operating Systems
David Burdett May 11, 2004 Package Binding for WS CDL.
Microsoft Access 2007 Advanced Level. © Cheltenham Courseware Pty. Ltd. Slide No 2 Forms Customisation.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
CALENDAR.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
1 Chapter 12 File Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 Advanced Tools for Account Searches and Portfolios Dawn Gamache Cindy Bylander.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Photo Slideshow Instructions (delete before presenting or this page will show when slideshow loops) 1.Set PowerPoint to work in Outline. View/Normal click.
Knowledge Extraction from Technical Documents Knowledge Extraction from Technical Documents *With first class-support for Feature Modeling Rehan Rauf,
Break Time Remaining 10:00.
Factoring Quadratics — ax² + bx + c Topic
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Database Performance Tuning and Query Optimization
PP Test Review Sections 6-1 to 6-6
Briana B. Morrison Adapted from William Collins
11 Copyright © Oracle Corporation, All rights reserved. Managing Tables.
9 Copyright © 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
Microsoft Confidential. We look at the world... with our own eyes...
Go-Faster Consultancy Ltd.1 Experiences of Global Temporary Tables in Oracle 8.1 David Kurtz Go-Faster Consultancy Ltd.
1 of 27 DA1241 Archive Companies Last updated: March-2004 DA1241 Archive Companies.
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Chapter 10: Virtual Memory
Health Artifact and Image Management Solution (HAIMS)
R12 Assets A Look Inside SM. Copyright © 2008 Chi-Star Technology SM -2- High-Level Overview R12 Setups –Subledger Accounting –ADI Templates –XML Reports.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Why Do You Want To Work For Us?
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Note: A bolded number or letter refers to an entire lesson or appendix. A Adding Data Through a View ADD_MONTHS Function 03-22, 03-23, 03-46,
1..
1 TV Viewing Trends Rivière-du-Loup EM - Diary Updated Spring 2014.
Adding Up In Chunks.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
GL Interfaces 1 Using General Ledger Interfaces The File Maintenance and Procedures to successfully use the General Ledger Interfaces Jim Simunek, CPIM.
Graphing AWR Data in Excel
Global Payroll Performance Optimisation - I David Kurtz Go-Faster Consultancy Ltd.
Partition, Compress, Archive and Purge Keep Your System on the Road David Kurtz Go-Faster Consultancy Ltd.
Subtraction: Adding UP
: 3 00.
5 minutes.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Speak Up for Safety Dr. Susan Strauss Harassment & Bullying Consultant November 9, 2012.
Essential Cell Biology
Converting a Fraction to %
Clock will move after 1 minute
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Chapter 13 Web Page Design Studio
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Copyright Tim Morris/St Stephen's School
Introduction Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September 9, 2010.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Presentation transcript:

Partition, Compress, Archive and Purge Keep Your System on the Road David Kurtz Go-Faster Consultancy Ltd.

Who Am I? Oracle Database Specialist –Independent consultant Performance tuning –PeopleSoft ERP –Oracle RDBMS Book – OakTable UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

It depends… The answer to all questions should be deemed to be implicitly prefixed it depends if they are not already explicitly so prefixed. The reasons for this include, but are not limited to: –There may be exceptions where the answer is either false or not completely true –There may be exceptions to the exceptions and so on ad infinitum. –The question may not explicitly scope all the conditions upon which the answer depends © UKOUG PeopleSoft Partition, Compress, Archive, Purge

This happens to be a story about... An ERP System –But it could be about any on-line transaction processing system. A PeopleSoft system –But it could be about any ERP PeopleSoft HR/Time & Labour/Payroll –But it could be about any product UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

PeopleSoft HR, T&L, Morrisons 130,000 employees –100,000 in stores Scheduled hours –Clock in/out –T&L matches reported hours with schedules to determine payable time –Legacy T&L feed from Manufacturing and Distribution. –Payable time passed to Global Payroll. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

UKOUG PeopleSoft Partition, Compress, Archive, Purge © Tb/yr

Two Challenges Performance –Big Tables (for OLTP) Eg payroll accumulator table 2.4 billion rows! –Poor/Variable Performance Various processes and reports suffering Critical Processes Database Size –>4TB –Growth 1TB/year –Backup Size/Contention –Cloning Dev/Test environments UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Throw Away When we say the database is slow, often: –It is fetching data from disk, reading it, and deciding it isnt something it wants and throwing it away. –It would be better if we had not spent time and resource fetching it in the first place The fastest way to do anything is not to do it at all. –Cary Millsap UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

4 Techniques Partition –Breaking tables and indexes into managable pieces Compress –Squeezing more data into the same space Archive –Get the data out of the live application tables and put it somewhere else. Purge –Expunge the data from the database UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

PARTITIONING UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Partitioning UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Partitioning decisions driven by Application Global Payroll –streamed processing –RANGE on EMPLID to match streaming Financials General Ledger –FISCAL_YEAR & ACCOUNTING_PERIOD –Monthly/Quarterly/Annual partitions. Other Financials Modules? –Less Obvious UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Partitioning is a Pre-requisite Links logical data value to physical location of data in the database. Time-based partitioning –Future / Current / Historical Partition-wise operations –Compress historical partitions –Archive by partition exchange –Purge by dropping whole partitions. –Less Redo. Faster. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Delete rows –v- Drop Partition? Free space is left in data block. Data block remain part of table/index Still scanned by queries. Still backed up by RMAN No longer in a database object. So not referenced. Free space is available in tablespace. –Still backed up If the space at end of the datafile it can be trimmed off by resize. –No longer backed up UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Managing Partitioning in PeopleSoft Partitioning strategies –Described own meta-data tables PL/SQL Utility package –generate DDL scripts. –Driven by PeopleTools tables and our own meta-data Application Designer from PT8.51 will preserve some existing partitioning –See Managing Oracle Table Partitioning in PeopleSoft Applications with GFC_PSPART Package UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Partitioning PeopleSoft at Morrisons Global Payroll –46 tables range on EMPLID, matching 32 streams –List sub-partition largest tables by pay period (CAL_RUN_ID). –24 archive tables, range partitioned on pay period into tax-year partitions. –2 custom GP reporting tables Schedules & Time and Labor –10 tables in weekly range partitions –of which Reported Time table hash sub-partitioned Audit Tables –28 monthly range partitions on audit timestamp Security Tables –Separate partitions for different business units UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Partitioning Trick Timezone Table –Small, but accessed VERY frequently by T&L –1 partition for GMT only Only 1 row –1 partition for CET only Only 1 row –1 partition for the rest –Less CPU to read first row in block than second etc. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Licencing of Partitioning Oracle RDBMS Enterprise Edition only –And then separately licenced Also a cost option on other database platforms. No licence implication for PeopleSoft. –Partitioning does not invalidate any aspect of your support. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

COMPRESSION UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Oracle RDBMS Compression Basic Compression –Not separately licenced –Only option in 10g Advanced Compression Out of scope of this presentation –Licenced option –Available in 11g Hybrid Columnar Compression (HCC) Also out of scope of this presentation. –Exadata and ZFS filesystem only. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Simple Compression Block Dictionary Encoding –Data values stored only stored once in array in data block. –Pointer from row of data to array of values. Shorter Rows, more rows per block, fewer Blocks, less I/O More CPU to read row. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Table Compression Specified at table or partition level with DDL –Sub-partition level inherits from partition level Compression only occurs –On creation of the object ALTER TABLE … COMPRESS –Direct path insert into object –CPU overhead during compression and read Decompression occurs –during any other DML UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Index Compression Apply to all or none of index Index remains compressed –DML does not decompress –Performance overhead We have not compressed many live application indexes. We have compressed all archive tables. Table compression does not affect index size. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

What do I compress? Depends on application, business, and partitioning strategy. –Audit data partitions: as soon as month ends –Payroll result data: when pay period is closed for 1 month –T&L: after 6 months UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Compression Gotcha! During –ALTER TABLE PARTITION … MOVE … COMPRESS. Local index partitions can momentarily become unusable before they go back to being usable. This can cause application errors –Choose when to compress carefully, or do it in an outage! UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

When can I compress my data? When it is no longer updated by application. –Because DML uncompresses it –But that may be well be you can archive/purge. Written custom PL/SQL utility package –Meta-data rules to determine when partition no longer updated. –Needs knowledge of business/application. –Incrementally compress static partitions. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

How much compression? It depends on your data! We have see a factor 2x – 5x on tables –(50%-80% reduction in size) Indexes are less compressible –Indexes with more columns can be more compressible UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

PL/SQL Utility Package GFC_ARCH_MGMT –DBA run management utility –Moves partitions to correct tablespace –Compresses/Decompresses partitions per specification in meta-data. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

ARCHIVE & PURGE UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Archive & Purge Archive: –Move data from live application table to another table. –In this case another to table in the same database. –Read-only access provided to archive tables. Purge: –Expunge data from the database. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Archive/Purge For each table or set of tables –Define a policy that specifies when data is archived or purged. Compression too, but that has no functional impact. Discuss with business –Check legal requirements PAYE 3 years, Company Accounts 6 years UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

But my data will disappear That may be a good thing –If you keep data you have to look after it responsibly. –Pay for the disk to store it/back it up. Read-only access via PS/Query tool to archive data. A very few components and reports access archive tables –Development cost of customisation UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Example Archive/Purge Policies –GP: archive 2 rolling years, purge after 8 tax years –Schedules, purge at 56 weeks –T&L, purge at 108 weeks –Audit: various: Archive after 3 months, 1, 3 year Purge 6 months, 1 year, 2 years, never UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Archive Method Partition Management –Exchange/Drop whole Partitions Time based partitioning –Avoid rewriting data –Avoids redo Faster –Compression must match Some archive table indexes not compressed. Row-by-Row –Non-time based partitioning GP –Can be done on-line –Can compress data during rewrite –Different partitioning strategy in archive and live. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

PeopleTools Archive Utility Row-by-Row processing only –Slow and cant reclaim space –Cant compress data during copy Additional key columns in archive table –Enlarges archive tables –Causes performance problems with index access Still need to drop empty partitions. Generic –Meta-data driven Sets of tables to archive Corresponding archive tables GP set delivered UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

PL/SQL Archive/Purge Utility Custom PL/SQL Package –Driven by same meta-data as partitioning utility –Archive by partition exchange –Purge by dropping partition. –Called from custom Application Engine So archiving can be done via application. –Writes To PeopleSoft Message Log Various Oracle trace/log files UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

No-Archive Rules UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Custom Archive Utility Based on delivered PeopleSoft Archive Utility We only use it for GP archiving Copies data in direct path –Faster –Can compress during copy Calls PL/SQL utility to drop partitions to save deleting data. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

PSARCH Schema Design 2 nd schema to hold archive tables –Only tables archived by partition exchange –Same name as live tables –Same local indexes as live Benefits –SYSADM cannot update/delete from these tables. Drawbacks –Views to make them accessible to PS/Query. –Cant manage indexes through Application Designer. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Tablespace Design No impact on performance –Because all on same tier of disk Do not keep objects with dissimilar purge policies in same tablespaces –You can drop empty tablespaces and recover space. Periodic tablespaces make sense without purge policy With a purge policy might just have one tablespace. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Wrong Tablespace Design Before archive policy –Weekly T&L and Schedule partitions in same monthly tablespaces Archive Policy –T&L: 108 weeks –Schedules: 56 weeks Schedules populated first, T&L later. –Schedules tend to be nearer start of tablespace –Schedules purged first leaving hole than cannot be trimmed off. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Free Space Fragmentation Free Space left in middle of tablespace –Dropping objects –Compressing objects can leave holes Less Severe since Oracle 9i –Uniform extent sizes –Bitmap space map UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Oracle RMAN Backup Backs up block with SCN –If an object is dropped blocks still have SCN –Empty blocks can still be backed up. Can only reduce backup size by trimming free space from end of data files. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Defragmentation of Free Space PL/SQL utility to rebuild objects nearest end of data file into spaces in the middle of the tables –Needs to be done during an application outage. Frees space at end of data file that can be trimmed off. –Thus reducing size of database and backup. UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Oracle Flashback Database SQL Rollback –We are used to the idea of rolling back transaction that have not been committed. Flashback database –Generates additional flashback logging –Rollback committed transaction and DDL but not through a drop/resize data file –Whole database option Highly effective in testing archive/purge UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Future: Oracle 11g Automatic Partition Creation Range-Range partitioning Advanced Compression –Licenced Option –Supports DML Active Data-Guard –Off-load query activity to standby database UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

PROGRESS UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

UKOUG PeopleSoft Partition, Compress, Archive, Purge © Tb/yr 0.48Tb/yr

UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Achievements Database Size –4.5TB => <2.25TB (with GP purge) Still have to purge old schedule and T&L data Expected Performance Improvements –GP calculation and other processing –T&L processing –Financial Reports UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Conclusion It depends… UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

QUESTIONS? Nullius in verba UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

You know my methods, apply them. A Study in Scarlet, Arthur Conan-Doyle UKOUG PeopleSoft Partition, Compress, Archive, Purge ©

Partition, Compress, Archive and Purge Keep Your System on the Road David Kurtz Go-Faster Consultancy Ltd.