Horizontal Table Partitioning

Similar documents
Table Partitioning Application and Design

Enhance Database Performance and Scalability

Table Partitioning. So you want to get Horizontal? Brian Bowman OpenEdge Product Management

Change Data Capture OpenEdge 11.7

Building Event Driven Architectures using OpenEdge CDC Richard Banville, Fellow, OpenEdge Development Dan Mitchell, Principal Sales Engineer

OpenEdge Roadmap. Rob Straight Director, OpenEdge Product Management October 25, 2018

What s Next for OpenEdge

Introduction to Multi-tenancy. Gus Bjorklund October 2013

Synergetics-Standard-SQL Server 2012-DBA-7 day Contents

abstract 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

What s New in OpenEdge 11.4?

OpenEdge 11.5 Table Partitioning Workshop

Delegates must have a working knowledge of MariaDB or MySQL Database Administration.

Partitioning in Oracle 12 c. Bijaya K Adient

Progress OpenEdge Multi-tenant Database

Oracle Database 11g for Experienced 9i Database Administrators

Database Management Systems

IBM DB2 11 DBA for z/os Certification Review Guide Exam 312

Course Contents of ORACLE 9i

What s New with VSTs. Richard Banville Fellow, OpenEdge Development. November 16, 2017

1 Dulcian, Inc., 2001 All rights reserved. Oracle9i Data Warehouse Review. Agenda

The New Face of MS SQL Server DataServer Deployment

Oracle Database 10g: New Features for Administrators Release 2

Data Warehousing & Big Data at OpenWorld for your smartphone

ITExamDownload. Provide the latest exam dumps for you. Download the free reference for study

ORACLE DBA TRAINING IN BANGALORE

Designing Database Solutions for Microsoft SQL Server (465)

<Insert Picture Here> DBA Best Practices: A Primer on Managing Oracle Databases

JSPM s Bhivarabai Sawant Institute of Technology & Research, Wagholi, Pune Department of Information Technology

OpenEdge 12.0 Database Performance and Server Side Joins. Richard Banville Fellow, OpenEdge Development October 12, 2018

In-Memory Data Management Jens Krueger

About Speaker. Shrwan Krishna Shrestha. /

70-459: Transition Your MCITP: Database Administrator 2008 or MCITP: Database Developer 2008 to MCSE: Data Platform

IT Best Practices Audit TCS offers a wide range of IT Best Practices Audit content covering 15 subjects and over 2200 topics, including:

DB Basic Concepts. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

MultiTenancy - An Overview For Techies

OPS-23: OpenEdge Performance Basics

Module 9: Managing Schema Objects

InnoDB: Status, Architecture, and Latest Enhancements

Eternal Story on Temporary Objects

What s New with VSTs. Rich Banville June 5, 2017

Microsoft SQL Server Database Administration

Guide to Mitigating Risk in Industrial Automation with Database

Azure-persistence MARTIN MUDRA

Outline. Database Tuning. Ideal Transaction. Concurrency Tuning Goals. Concurrency Tuning. Nikolaus Augsten. Lock Tuning. Unit 8 WS 2013/2014

Course Description. Audience. Prerequisites. At Course Completion. : Course 40074A : Microsoft SQL Server 2014 for Oracle DBAs

Oracle Database 12c: New Features for Administrators (40 hrs.) Prerequisites: Oracle Database 11g: Administration Workshop l

EDUVITZ TECHNOLOGIES

Abstract Progress Software Corporation.

Oracle 9i release 1. Administration. Database Outsourcing Experts

Database Management and Tuning

1Z Upgrade to Oracle Database 12cm Exam Summary Syllabus Questions

5. Single-row function

CHAPTER. Oracle Database 11g Architecture Options

Data Partitioning. For DB Architects and Mere Mortals. Dmitri Korotkevitch

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

MTA Database Administrator Fundamentals Course

Compellent Storage Center

Course 40045A: Microsoft SQL Server for Oracle DBAs

Oracle 1Z0-053 Exam Questions & Answers

Exam 1Z0-061 Oracle Database 12c: SQL Fundamentals

Heckaton. SQL Server's Memory Optimized OLTP Engine

1-2 Copyright Ó Oracle Corporation, All rights reserved.

Oracle Secure Backup 12.1 Technical Overview

Explore the Oracle 10g database architecture. Install software with the Oracle Universal Installer (OUI)

Interpreting Explain Plan Output. John Mullins

Database Architectures

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

Martin Cairney. The Why and How of Partitioned Tables

SQL Server Myths and Misconceptions

IBM Spectrum Protect Node Replication

Martin Cairney SPLIT, MERGE & ELIMINATE. SQL Saturday #572 : Oregon : 22 nd October, 2016

DESIGNING DATABASE SOLUTIONS FOR MICROSOFT SQL SERVER CERTIFICATION QUESTIONS AND STUDY GUIDE

OpenEdge Change Data Capture and the ETL Process WHITEPAPER AUTHOR : LAKSHMI PADMAJA

InnoDB: What s new in 8.0

SQL (Structured Query Language)

Oracle Database 10g: Implement and Administer a Data Warehouse

Oracle Database 10g : Administration Workshop II (Release 2) Course 36 Contact Hours

InnoDB: What s new in 8.0

CROSS PLATFORM DUMP AND LOAD FOR

MySQL Cluster Student Guide

Tales of the Secret Bunker 2016 (231) Dump and Load Edition Mike Furgal Director MDBA and Pro2 Services Gus Bjorklund - Lackey

Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and

1Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2014/15

7. Query Processing and Optimization

Oracle Database 18c and Autonomous Database

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Pass IBM C Exam

What is wrong with PostgreSQL? OR What does Oracle have that PostgreSQL should? Richard Stephan

OpenEdge Replication. A Few Words about the Speaker. Before We Start. Agenda. Business Continuity. Business Continuity Myths 3/23/2016

ORACLE 11gR2 DBA. by Mr. Akal Singh ( Oracle Certified Master ) COURSE CONTENT. INTRODUCTION to ORACLE

Distributed KIDS Labs 1

ORACLE 8 OBJECT ORIENTED TECHNOLOGY ORACLE SOFTWARE STRUCTURES SERVER SIDE BACKGROUND PROCESSES DATABASE SERVER AND DATABASE INSTANCE

Empowering DBA's with IBM Data Studio. Deb Jenson, Data Studio Product Manager,

Managing the Database

OpenEdge 11 Strategy & Roadmap. Jarmo Nieminen Senior Solution Engineer, Nordics

Data about data is database Select correct option: True False Partially True None of the Above

Oracle Database 12c R2: Administration Workshop Ed 3 NEW

Transcription:

Horizontal Table Partitioning Dealing with a manageable slice of the pie. Richard Banville Fellow, OpenEdge Development August 7, 2013

Agenda OverviewFunctionalityUsageSummary 2

Agenda 1 Overview 2 Feature Functionality 3 Usage 4 Summary 3

Agenda 1 Overview 2 Feature Functionality 3 Usage 4 Summary 4

Overview: Horizontal Table Partitioning What is it Table instance stored in multiple self-contained locations Typically used in OLTP deployments Based on user specified column value & storage area Different from partitioning by user identity (multi-tenancy) Row does not span partitions Referred to as just Table Partitioning As opposed to Vertical Table Partitioning Typically OLAP deployments Table is partitioned vertically by particular columns To reconstruct row, several partitions must be visited Usually partition by related columns within table P1 Order-date <= 12/31/2012 Order Record Data Order-date Index Order Table Order Table P1 Order-date <= 12/31/2013 Order Record Data Order-date Index P2 P2 5

Overview: Table Partitioning What is it good for Advantages Performance impact Partition elimination for queries ( pruning ) Improved concurrency Availability For random activity Maintenance advantages Purge, Archive Repair, rebuild Partition level tuning Disadvantages Partition alignment & lookup (insert/delete) Update of partition aligned key values Missing aligned columns in where clause DBA getting it right Knowledge of application table definition & physical layout Repartitioning costs More complex deployment 6

Agenda 1 Overview 2 Feature Functionality 3 Usage 4 Summary 7

Disclaimer This presentation is for informational purposes only, and the reader is hereby cautioned that actual product development may vary significantly from it This presentation may not be interpreted as any commitment on behalf of Progress, and future development, timing and release of any features or functionality described in this presentation remains at our sole discretion 8

Features Create named data partitioned storage based on column value Table partition based on a single value (List Partitioning) Table partition based on a value range (Range Partitioning) Ability to provide open ended ranges* Sub-partition partitioning Combination of multiple list and/or range partitioning on the same table Composite partitioning Multiple partition definitions with storage in the same physical partition Table partition based on multiple values in a single column Initially supported for migration only Partition level pruning Partition level locking (administrative operations) 9

List Partitioning: Data Access Partition based on a single value (List Partitioning) List Partitioning By region Pruned Value stored == partition definition Order Table Western Region For each Order where region = Northern : Northern Region Pruned Southern Region 10

Range Partitioning: Data Access Partition based on a value range (Range Partitioning) Range Partitioning By order-date Value stored <= partition definition Order Table 12/31/2011 Pruned Pruned For each Order where order-date >= 01/01/2012AND order-date <= 12/31/2012: Pruned 12/31/2012 12/31/2013 For each Order where order-date >= 01/01/2012 AND order-date < 01/01/2014: NOTE: Pruning optimization: Use >= or <= rather than > or <. The pruning is a bit more efficient! 11

Range Partitioning: Data Access Partition based on a value range (Range Partitioning) Range Partitioning By order-date Pruned Value stored <= partition definition Order Table 12/31/2011 12/31/2012 For each Order where order-date >= 01/01/2012: 12/31/2013 12

Sub-partitioning by Region & Date Sub-partitioning 9 partition example Sub-partition by region & order-date w/in region Western Region 12/31/2011 Order Table 12/31/2012 12/31/2013 12/31/2011 12/31/2012 12/31/2013 Northern Region 12/31/2011 12/31/2012 12/31/2013 Southern Region Only last partitioned column may be a range partition. Range partition can be any indexable field type 13

Composite Partitions by Region Composite Partitioning by region Value stored == partition definition Order Table For each Order where region = Northern : Index Selection Western Region Northern Region Partition 0 Data logically segregated Pruned Southern Region Partition 1 Implemented for migration only. 14

Composite Partitioning by Region & Date Composite Partitioning Sub-partition by region & order-date w/in region Western Region 12/31/2011 Order Table 12/31/2012 12/31/2013 Northern Region 12/31/2011 12/31/2012 12/31/2013 12/31/2012 12/31/2013 12/31/2014 Southern Region Implemented for migration only. Only one range value per unique list value set 15

Composite Partitioning by Region & Date Composite Partitioning Sub-partition by region & order-date w/in region Western Region 12/31/2011 Order Table 12/31/2012 12/31/2013 Northern Region 12/31/2011 12/31/2012 12/31/2013 12/31/2012 12/31/2013 12/31/2014 Southern Region Implemented for migration only. Only one range value per unique list value set Partition 0 Data logically segregated Partitions 1-3 Data physically segregated 16

Composite Partitioning by Region & Date Composite Partitioning Sub-partition by region & order-date w/in region Western Region Order Table 12/31/2012 12/31/2013 Northern Region 12/31/2012 12/31/2013 12/31/2013 12/31/2014 Southern Region Implemented for migration only. Only one range value per unique list value set Partition 0 Data logically segregated Partitions 1-3 Data physically segregated 17

Hash Partitioning: Data Access Hash Partitioning No plans to implement Create Order. Assign order-num = next-value(order-seq). Apply hash function to order-num. Store data in resulting partition #. Order Table Hash #1 1, 4, 7 Hash #2 2, 5, 8 Hash #3 3, 6, 9 18

Index Support Local index support One index b-tree per partition Index MUST be partition aligned Global index support One index b-tree containing all the table s data Ability to index across partitions Typically for non-partitioned aligned sort order Provides uniqueness support for non-partitioned columns Unique cust-num or sort by name for example Composite index support One index b-tree containing entries for multiple partition definitions Table data for composite partition stored in same partition 19

Index Types: Data Access Range Partitioning By order-date Pruned Order Table 12/31/2011 12/31/2012 For each Order where order-date >= 01/01/2012: 12/31/2013 Index Components Partition Aligned Index #1 {Order-Date, Name} YES Index #2 {Order-Date, S-rep} YES Index #3 {Cust-num} NO 20

Index Types: Data Access Range Partitioning By order-date For each Order where order-date >= 01/01/2012: Pruned Order Table 12/31/2011 12/31/2012 12/31/2013 Index Components Partition Aligned Index #1 (local) {Order-Date, Name} YES Index #2 (local) {Order-Date, S-rep} YES Index #3 (global) {Cust-num} NO 7 B-trees supporting 3 index definitions Idx #1 Idx #2 Idx #3 Local indexes on order-date, name Local indexes on order-date, S-rep Global indexes span partitions Indexed field need not be partition aligned 21

Table Scanning: Data Access Range Partitioning By order-date Pruned Order Table 12/31/2011 12/31/2012 For each Order where order-date >= 01/01/2012 TABLE-SCAN: 12/31/2013 Restrict data retrieved without using an index. Ordered by partition. Random order within partition. (Cluster order, not rowid order) 22

Space Allocation and Access Limits 32,765 partitions per table 15 column sub-partition definition Separate partition definition and space allocation capabilities Can store (table, index, LOB) partitions for same table in different Type II Storage Areas Can define partitions without allocating space Can specify open ended range partitions Everything <= High-range Mark a partition as read only Avoid backing up read only partitions (via incremental backup) Take partitions offline and back online 23

Some General Restrictions Partitioning Restrictions Partitioning exists for objects in Type II Storage areas only Partition cannot span storage areas No temp table support Re-partitioning only supported through dump & load Different partition column or type (change of values via split or merge) No overlapping range values or gaps for range partitioning Only 1 range component per partitioned table Also, must be last component No partitioning of multi-tenant tables* 24

Some More General Restrictions Indexing Restrictions Local indexes ALWAYS follow table partition definition They are always partitioned aligned Word indexes cannot be local indexes They are not partition aligned Local index partition Id same as matching table partition Id Utilities Database wide operations will continue to be database wide Auditing, replication, transparent data encryption, backup, restore, roll forward, authorization 25

Migration Application transparency Add/delete/split/merge without ABL re-compile No new language syntax to access partitioned table (find by rowid is special!) GUI for partition management via OpenEdge Management (OEM) and OpenEdge Explorer (OEE) Migration Networked access backward compatible (?) Ability to enable partitioning on current table without data movement Leverage composite partitioning (next section) Must have partition aligned composite index Ability to split out existing data into new partition (online) OEM/OEE Tool will help with list partition migration Identify current unique values 26

Migration Application transparency Add/delete/split/merge without re-compile No new language syntax to access partitioned table GUI for partition management via OE Management and OE Explorer Migration Networked access Ability to enable partitioning on current table without data movement Leverage composite partitioning Must have partition aligned global index Ability to split out existing data into new partition (online) Tool will help with list partition migration Identify current unique values 27

Migration: Range partitioning by Order-Date Migration Partition aligned index by order-date All existing data in current partition 0 Order-Date Order Table Index #10 Partition #0 10 28

Migration: Range partitioning by Order-Date Migration Partition aligned index by order-date All existing data in current partition 0 10/09/2013 Order Table All new data stored in proper partition 12/31/2013 Local Index #10 Partition #1 10 12/31/2014 Local Index #10 Partition #2 10 Index #10 Partition #0 10 29

Migration: Composite list partitioning by Region Migration Partition aligned index by region All existing data in current partition 0 Western Region Order Table Northern Region Southern Region Composite Index #10 Partition #0 10 30

Migration: Composite list partitioning by Region Migration Partition aligned index by region New partitions created Tool creates unique list entries Data migrated via split utility (as time allows) proutil <db> -C partitionmanage split table order* Order Table Western Region Northern Region Southern Region Western Northern Southern Local Index #10 Partition #1 10 Local Index #10 Partition #2 10 Local Index #10 Partition #3 10 Composite Index #10 Partition #0 10 31

Migration: List partitioning by Region Migration Partition aligned index by region New partitions created Tool creates unique list entries Data migrated via split utility (as time allows) Original space recaptured via truncate proutil <db> -C partitionmanage truncate table order* Order Table Composite Index #10 Partition #0 Western Northern Southern Local Index #10 Partition #1 10 Local Index #10 Partition #2 10 Local Index #10 Partition #3 10 10 32

Composite & Sub-partitioning by Region & Order-date Migration Partition aligned index by region & order-date within region Western Region Order-date Order Table Northern Region Southern Region Composite Index #10 Partition #0 10 33

Composite & Sub-partitioning by Region & Order-date Migration Partition aligned index by region & order-date within region Western Region Order Table 10/09/2013 12/31/2013 Local Index #10 Partition #1 10 Northern Region 10/09/2013 12/31/2013 Local Index #10 Partition #2 10 Southern Region 10/09/2013 12/31/2013 Local Index #10 Partition #3 10 Composite Index #10 Partition #0 10 34

Agenda 1 Overview 2 Feature Functionality 3 Usage 4 Summary 35

Enablement proutil <db> -C enabletablepartitioning _Partition-Policy (-352) Describes partition at the table level _Partition-Policy-Detail (-353) Defines each individual partition Column Name Type 2 _Partition-Policy-Name character 3 _Object-Number integer 4 _DataArea-default integer 5 _IndexArea-default integer 6 _LobArea-default integer 7 _Allocation-default character (None, immediate, delayed) 8 _Num-Columns integer 9 _Column-Name character[16] 10 _Has-Range logical 11 _Description character 12 _Misc character[16] Column Name Type 2 _Object-Number integer 3 _Partition-Id integer 4 _Partition-Name character 5 _Partition-Column-Value character[16] 6 _Partition-Internal-Value raw 7 _Attributes Logical[64] [1] = 1 space allocated [4-63] unused 8 _Description character 9 _ianum-data Integer 10 _ianum-index Integer 11 _ianum-lob integer 12 _Misc character[16] [2] = 1 this is a sub-partition [3] = 1 lowest level sub-partition 36

DDL Support ABL API support will be provided define variable policy as IPartitionPolicy no-undo. define variable detail as IPartitionPolicyDetail no-undo. Associate table w/partitioning Define partition for table policy = Service:NewPartitionPolicy("Order date") policy:defaultallocation = "Immediate" policy:table = tbl detail = Service:NewPartitionPolicyDetail("Olddata") detail:setvalue(12/31/2012) policy:detail:add(detail). Used by OpenEdge Explorer and OpenEdge Management OpenEdge SQL will provide it own DDL support 37

New Maintenance Functionality proutil <db> -C partitionmanage truncate partition <pname> table <tname> numrecs <#recs per txn> Proutil partition operations (online all without major bi impact) View Rename Truncate / delete / archive Truncate recaptures space Delete recaptures space & removes definition Archive combines dump & truncate Multiple concurrent operations Supports OpenEdge Replication 38

New Partition Maintenance Utilities proutil <db> -C partitionmanage split merge table <table> partition <src> <targ> Split & Merge Data moved in/out of partitions Transactional scoping by groups of record/index operations Data for same partition definition spans physical partitions Only ever one copy of the data Online operation with access to non-split / non-merge data New split/merge transitional state for partitions Multiple concurrent operations Supports OpenEdge Replication Recovery of operation restarts where left off 39

Administration ABL APIs & Dictionary New APIs for DDL support Dump and Load of Data & Definitions Partition policies managed as record data, not.df Data Dictionary TTY and GUI support Restricted to minimal changes (_file and _index) Data Admin Console (OpenEdge Explorer/Management) Subset of multi-tenancy object level support Partition Create/Move Move partitions prior to allocation vs after allocation Partition Allocation State Buffer pool assignment Dump/Load support 40

Utility Support Monitoring Promon and VSTs will support partition level monitoring Utilities with partition level only option: Table/index move support Utilities with partition and table level options: Partition level recovery (via improved TDR functionality) Analysis tools dbanalys/idxanaly/tabanalys/chanalys Analysis output Optionally provide.csv type formatted file (rather than a hierarchical report) Set/display create/toss limits View/manage alternate buffer pool (vewb2) dbtool 41

Utility Support (continued) Index Check Index Rebuild, Index Fix, Index Compact Index Activate/Deactivate Binary dump / load Bulkload & file definition SQL dump/load * NOTE: Load based on data value, not partition specification Other Can load to one or many partitions Move schema: mvsch dbrpr limited partition support 42

Agenda 1 Overview 2 Feature Functionality 3 Usage 4 Summary 43

Table Partitioning Summary Partition Types Types List Partitioning Range Partitioning List-range Partitioning Sub-partitioning Composite Partitioning Indexing Support Global Index Local Index (aligned) Composite Automatic pruning Migration In place migration No application changes List and range migration Maintenance Existing Object level utilities made partition aware New New Maintenance Truncate / Delete View / Rename Split / Merge 44

Table Partitioning Early Software Access Program Tech Preview coming: Q1 2014 Objective: Demonstrate basic table partition functionality Usual Phased rollout approach Capabilities* Partition creation & maintenance Migration examples * Subject to feature availability at the time White papers and examples Special presentations and webinars Participation Access by enrollment only For enrollment & more information Contact: Rob Holzel: holzel@progress.com o OpenEdge Product Management 45