OpenWorld 2015 Oracle Par22oning

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

Data Warehousing & Big Data at OpenWorld for your smartphone

Oracle 11g Partitioning new features and ILM

ORACLE DATA SHEET ORACLE PARTITIONING

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

So you think you know everything about Partitioning?

Oracle Partitioning in Oracle Database 12c Release 2

An Oracle White Paper June Partitioning with Oracle Database 12c

Data Vault Partitioning Strategies WHITE PAPER

Oracle Database 12c R2: New Features for Administrators Part 2 Ed 1

Oracle Database 12c R2: New Features for Administrators Part 2 Ed 1 -

Crea?ng Cloud Apps with Oracle Applica?on Builder Cloud Service

Partitioning in Oracle 12 c. Bijaya K Adient

Exploring Oracle Database 11g/12c Partitioning New Features and Best Practices. Ami Aharonovich Oracle ACE & OCP

Automating Information Lifecycle Management with

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

Oracle Database 10g: Introduction to SQL

Oracle Syllabus Course code-r10605 SQL

<Insert Picture Here> DBA s New Best Friend: Advanced SQL Tuning Features of Oracle Database 11g

Oracle Flashback Data Archive (FDA) O R A C L E W H I T E P A P E R M A R C H

Oracle Database In-Memory

VLDB. Partitioning Compression

Insider s Guide on Using ADO with Database In-Memory & Storage-Based Tiering. Andy Rivenes Gregg Christman Oracle Product Management 16 November 2016

Stay Informed During and AEer OpenWorld

Sql Server Syllabus. Overview

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

6232B: Implementing a Microsoft SQL Server 2008 R2 Database

Top Ten Tips for Partitioning

Seminar: Presenter: Oracle Database Objects Internals. Oren Nakdimon.

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Oracle Database 18c and Autonomous Database

InnoDB: What s new in 8.0

Review -Chapter 4. Review -Chapter 5

Chapter 1 SQL and Data

Oracle Database 10g: Implement and Administer a Data Warehouse

ORACLE 12C NEW FEATURE. A Resource Guide NOV 1, 2016 TECHGOEASY.COM

7. Query Processing and Optimization

Submitted to: Dr. Sunnie Chung. Presented by: Sonal Deshmukh Jay Upadhyay

5. Single-row function

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Module 9: Managing Schema Objects

Oracle VM Workshop Applica>on Driven Virtualiza>on

Querying Microsoft SQL Server (461)

MySQL Cluster Web Scalability, % Availability. Andrew

SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability

Introduction to Computer Science and Business

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

Partitioning Tables and Indexing Them

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

Oracle Optimizer: What s New in Oracle Database 12c? Maria Colgan Master Product Manager

[MS20464]: Developing Microsoft SQL Server 2014 Databases

MySQL 8.0: Atomic DDLs Implementation and Impact

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

Real-World Performance Training Star Query Prescription

Data Warehousing 11g Essentials

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

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

InnoDB: Status, Architecture, and Latest Enhancements

Performance Innovations with Oracle Database In-Memory

Oracle SQL & PL SQL Course

Moving Databases to Oracle Cloud: Performance Best Practices

Customer Experiences with Oracle XML DB. Aris Prassinos MorphoTrak, SAFRAN Group Asha Tarachandani & Thomas Baby Oracle XML DB Development

Safe Harbor Statement

Oracle 1Z0-515 Exam Questions & Answers

Oracle Database 11g: Administer a Data Warehouse

Chapter 8: Working With Databases & Tables

Fusion Product Hub Training Data Governance: Business Rules and Impact Analysis. July 2014

The Future of Postgres Sharding

Online Operations in Oracle 12.2

Oracle Database 11g: SQL and PL/SQL Fundamentals

SQL: Data De ni on. B0B36DBS, BD6B36DBS: Database Systems. h p:// Lecture 3

Java Card Pla*orm Evolu/on

Internals of Active Dataguard. Saibabu Devabhaktuni

Mondrian Mul+dimensional K Anonymity

Oracle SQL Tuning for Developers Workshop Student Guide - Volume I

Oral Questions and Answers (DBMS LAB) Questions & Answers- DBMS

SQL- Updates, Asser0ons and Views

MTA Database Administrator Fundamentals Course

Learn Well Technocraft

EDUVITZ TECHNOLOGIES

Oracle Database 12c R2: New Features for 12c R1 Administrators Ed 1

Course Outline and Objectives: Database Programming with SQL

Oracle Database: SQL and PL/SQL Fundamentals NEW

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

Appendix A. Using DML to Modify Data. Contents: Lesson 1: Adding Data to Tables A-3. Lesson 2: Modifying and Removing Data A-8

Safe Harbor Statement

Re- op&mizing Data Parallel Compu&ng

DATA AND SCHEMA MODIFICATIONS CHAPTERS 4,5 (6/E) CHAPTER 8 (5/E)

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database 12c: New Features for Administrators Duration: 5 Days

Data Manipulation (DML) and Data Definition (DDL)

Projects. Corporate Trainer s Profile. CMM (Capability Maturity Model) level Project Standard:- TECHNOLOGIES

Building Better. SQL Server Databases

Press Release Writing Tips and Tricks for the Enterprise Technology Space

<Insert Picture Here> Boosting performance with MySQL partitions

NASPInet 2.0 The Evolu4on of Synchrophasor Networks

Oracle Tables TECHGOEASY.COM

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

Transcription:

OpenWorld 2015 Oracle Par22oning Did You Think It Couldn t Get Any Be6er?

Safe Harbor Statement The following is intended to outline our general product direc2on. It is intended for informa2on purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or func2onality, and should not be relied upon in making purchasing decisions. The development, release, and 2ming of any features or func2onality described for Oracle s products remains at the sole discre2on of Oracle. 3

Oracle Par22oning Already over a decade of development Core func;onality Performance Manageability Oracle 8.0 Range partitioning Local and global Range indexing Static partition pruning Basic maintenance: ADD, DROP, EXCHANGE Oracle 8i Hash partitioning Range-Hash partitioning Partition-wise joins Dynamic partition pruning Expanded maintenance: MERGE Oracle 9i List partitioning Global index maintenance Oracle 9i R2 Range-List partitioning Fast partition SPLIT Oracle 10g Global Hash indexing Local Index maintenance Oracle 10g R2 1M partitions per table Multi-dimensional pruning Fast DROP TABLE Oracle 11g Virtual column based partitioning More composite choices Reference partitioning Interval partitioning Partition Advisor Incremental stats mgmt Oracle 11g R2 Hash-* partitioning Expanded Reference partitioning AND pruning Multi-branch execution (aka table orexpansion) Oracle 12c R1 Interval-Reference partitioning Partition Maintenance on multiple partitions Asynchronous global index maintenance Online partition MOVE Cascading TRUNCATE and EXCHANGE Partial indexing 4

Just when you thought it couldn t get any beper it did! Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Oracle Database 12c Release 2 Expand Par22oning strategies Further focus on data management and scalability 6

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Data Management and Scalability

Mul2-Column List Par22oning Business Requirement Solu2on Provide enhanced business modeling with par22oning Op2mize database integra2on with par22oned tables in Hive data store New mul2-column list par22oning strategy Address more complex unordered lists 8

Mul2-Column List Par22oning (USA, Direct) (USA, Partners) (GERMANY, Direct) (JAPAN, Partners), (JAPAN, Web) DEFAULT Data is organized in lists of mul2ple values (mul2ple columns) Individual par22ons can contain sets of mul2ple values Func2onality of DEFAULT par22on (catch-it-all for unspecified values) Ideal for segmenta2on of dis2nct value pairs, e.g. (region, channel) 9

Mul2-Column List Par22oned Table Syntax example CREATE TABLE sales ( region VARCHAR2(50), channel VARCHAR2(50), ) PARTITION BY LIST (region, channel) ( partition p1 values ( USA, Direct ), partition p2 values ( USA, Partners ), partition p3 values ( GERMANY, Direct ), partition p44 values (( Japan, Partners ), ( Japan, Web )), partition p45 values (DEFAULT) ); 10

Some Details of Mul2-Column List Par22oning Allow specifica2on of more than one column as par22oning key Up to 16 par22on key columns Each set of par22oning keys must be unique Nota2on of one DEFAULT par22on Specifica2on of DEFAULT on a per-column level is not supported to avoid disambiguity Func2onal support Supported as both par22on and subpar22on strategy Support for heap tables Support for external tables Supported with Reference Par22oning and Auto-List 11

Mul2-Column List Par22oning What if there was a DEFAULT per column? (USA, Direct) (Germany, Direct) (USA, DEFAULT) (DEFAULT, Partners) Where do we store (USA, Partners)???? 12

Mul2-Column List Par22oning What if there was a DEFAULT per column? (USA, Direct) (Germany, Direct) (DEFAULT) Where do we store (USA, Partners)???? In the one-and-only DEFAULT par22on 13

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Auto-list par22oning Data Management and Scalability

Auto-List Par22oning Business Requirement List par22oning for large number of dis2nct values is cumbersome Manual management Hash par22oning does not provide logical mapping Solu2on Simplify the maintenance of list par22oned tables by providing automa2c crea2on of par22ons for new values 15

Auto-List Par22oning BMW BMW Audi BMW Audi Mercedes Par22ons are created automa2cally as data arrives Extension to LIST par22oning Every dis2nct par22on key value will be stored in separate par22on Full func2onality of LIST par22oning is preserved 16

Details of Auto-List Par22oning Automa2cally creates new list par22ons that contain one value per par22on Mandatory requirement is at least one par22on No support for subpar22oning No no2on of default par22on System generated par22on names for auto-created par22ons Use FOR VALUES clause for determinis2c par22on iden2fica2on Can evolve list par22oning into auto-list par22oning Only requirement is having no DEFAULT par22on Protec2on of customer investment 17

Auto-List Par22oned Table Syntax example CREATE TABLE sales ( brand VARCHAR2(50), model VARCHAR2(50), ) PARTITION BY LIST (brand) AUTOMATIC ( partition p1 values ( BMW )); 18

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Auto-list par22oning Data Management and Scalability Par22oned external tables

Par22oned External Tables Business Requirement External data sources become more common, especially in Big Data environment Performant processing of large external data sets desired Solu2on Provide declara2ve par22oning for external data sources Integrate with Big Data sources 20

Par22oned External Tables USA, Direct USA, Partners GERMANY, Direct JAPAN, Partners JAPAN, Direct HIVE Par;;on HIVE Par;;on HIVE Par;;on HIVE Par;;on HIVE Par;;on External tables can be par22oned, using all basic par22oning techniques Mul2-column par22oning op2mally suited for par22oned HIVE tables Par22on pruning and limited par22on maintenance Support of add par22on, drop par22on, exchange par22on 21

Details for Par22oned External Tables Basic par22oning methods supported declara2vely No Interval, auto-list, or reference par22oning BePer constraint support Not null, unique, primary key, foreign key Only in rely disable mode Goal: iden2cal data access for internal and external tables Same sta2s2cs Same query transforma2ons Same access path for same data structures Oracle Confiden2al Internal/Restricted/Highly Restricted 22

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Auto-list par22oning Data Management and Scalability Par22oned external tables Enhanced online opera2ons

Enhanced Online Opera2ons Business Requirement Make data maintenance opera2ons more transparent for ongoing business ac2vi2es Solu2on Provide support for more online implementa2ons of frequently used DDL s 24

Currently Available Online DDL s Create index Add column Add constraint Drop Index Drop Constraint Alter table set unused column Alter table move par22on 11gR1 12cR1 25

Soon-To-Be Available Online DDL s Alter table move online for heap tables Alter table split par22on online Alter table modify non-par22oned table to par22oned table 12.2 26

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Auto-list par22oning Data Management and Scalability Par22oned external tables Enhanced online opera2ons Conversion to par22oned table 27

Conversion to Par22oned Table Business Requirement One-click conversion to par22oned tables without business interrup2on Solu2on Create a mechanism to easily convert non-par22oned tables to par22oned tables via na2ve SQL 28

Conversion to Par22oned Table SALES SALES USA GERMANY JAPAN DEFAULT Convert nonpar22oned tables to par22oned tables with single SQL command No conversion of par22oning methods No in-place conversion Online and offline mode Indexes are maintained and can be converted as part of the opera2on Default rule set, can be overwripen 29

Conversion to Par22oned Table Syntax Example CREATE TABLE sales ( order_num NUMBER, region VARCHAR2 (10), ); ALTER TABLE sales MODIFY PARTITION BY LIST (region) (partition p1 values ( USA ), partition p2 values ( Germany ), partition p3 values ( Japan ), partition p4 values (DEFAULT)) ONLINE; 30

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Auto-list par22oning Data Management and Scalability Par22oned external tables Enhanced online opera2ons Conversion to par22oned table Read only par22ons 31

Read Only Par22ons Business Requirement Solu2on Protect some data from upda2ng while allowing other data read write in the same table Expand read only func2onality from table level to par22ons and subpar22ons 32

Read Only Par22ons Q1 2015 Q2 2015 Q3 2015 Q4 2015 Read only Read only Read only Read write insert modify delete insert DML opera;ons blocked DML opera;ons allowed Par22ons and subpar22ons can be set to read only or read write Any apempt to alter data in a read only par22on will result in an error Ideal for protec2ng data from uninten2onal DML by any user or trigger 33

Read Only Par22ons CREATE TABLE orders ( order_id number, order_date DATE, ) READ WRITE PARTITION BY RANGE(order_date) ( partition q1_2015 values less than ( 2014-10-01 ) READ ONLY, partition q2_2015 values less than ( 2015-01-01 ) READ ONLY, partition q3_2015 values less than ( 2015-04-01 ), partition q4_2015 values less than ( 2015-07-01 ) ); 34

Read Only Par22ons Read only apribute guarantees data immutability SELECT <column_list> FROM <table> will always return the same data set aoer a table or [sub]par22on is set to read only Data immutability does not prevent all structural DDL for a table For example, ADD and MODIFY COLUMN are allowed and does not violate data immutability of exis2ng data Tables and [sub] par22ons can be set to read only Read only property follows standard apribute inheritance unless otherwise defined 35

Read Only Object versus Read Only Tablespace Read Only Tablespaces protect physical storage from updates DDL opera2ons that are not touching the storage are allowed E.g. ALTER TABLE SET UNUSED, DROP TABLE No guaranteed data immutability Read Only Objects protect data from updates Data immutability Does not prevent changes on storage E.g. ALTER TABLE MOVE COMPRESS, ALTER TABLE MERGE PARTITIONS 36

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Auto-list par22oning Data Management and Scalability Par22oned external tables Enhanced online opera2ons Conversion to par22oned table Read only par22ons Filtered par22on maintenance opera2ons 37

Filtered Par22on Maintenance Opera2ons Business Requirement Combining data maintenance with par22on maintenance requires mul2ple steps Solu2on Enhance par22on maintenance opera2ons to include capability of data filtering 38

Filtered Par22on Maintenance Opera2ons ORDERS Q3_2015 ORDERS Q3_2015 Delete all orders older than one year, but preserve the ones that are not completely fullfilled yet and store them on a different tablespace in compressed format Combines data maintenance with par22on maintenance Change par22on shape Change par22on apributes Change par22on data 12.2 Drama2cally simplifies common data maintenance workflows Available for all online and offline par22on maintenance opera2ons 39

Details of Filtered Par22on Maintenance Opera2ons Single table filter predicate to MOVE, SPLIT and MERGE opera2ons No joins or other more complex constructs allowed Specifica2on applied to all affected par22ons Specifica2on will be added to the recursively generated CTAS command for the crea2on of the various new par22on or subpar22ons segments Filter predicates work for both offline and online par22on maintenance opera2ons 40

Filtered Par22on Maintenance Opera2ons Move Par;;on Syntax Example ALTER TABLE orders MOVE PARTITION q3_2015 TABLESPACE archive INCLUDING ROWS WHERE order_state = open ; 41

Par22oning Enhancements in Oracle Database 12c Release 2 Expand Par;;oning strategies Mul2-column list par22oning Auto-list par22oning Data Management and Scalability Par22oned external tables Enhanced online opera2ons Conversion to par22oned table Read only par22ons Filtered par22on maintenance opera2ons Create Table for Exchange * Reduced Cursor Invalida2ons for DDLs * 42

Oracle Par22oning in Oracle Database 12.2 Over a decade of development and be6er than ever before Oracle 8.0 Oracle 8i Core func;onality Performance Manageability Range partitioning Local and global Range indexing Hash partitioning Range-Hash partitioning Static partition pruning Partition-wise joins Dynamic partition pruning Basic maintenance: ADD, DROP, EXCHANGE Expanded maintenance: MERGE Oracle 9i List partitioning Global index maintenance Oracle 9i R2 Range-List partitioning Fast partition SPLIT Oracle 10g Global Hash indexing Local Index maintenance Oracle 10g R2 1M partitions per table Multi-dimensional pruning Fast DROP TABLE Oracle 11g Oracle 11g R2 Virtual column based partitioning More composite choices Reference partitioning Hash-* partitioning Expanded Reference partitioning AND pruning Oracle 12c R1 Interval-Reference partitioning Partition Maintenance on multiple partitions Asynchronous global index maintenance Oracle 12c R2 Auto-list partitioning Multi-column list [sub]partitioning Partitioned external tables Online partition maintenance operations Online table conversion to partitioned table Reduced cursor invalidations for DDL s Interval partitioning Partition Advisor Incremental stats mgmt Multi-branch execution (aka table orexpansion) Online partition MOVE Cascading TRUNCATE Partial indexing Filtered partition maintenance operations Read only partitions Create table for exchange 43

Summary Par22oning con2nues to get be6er & be6er across the board! Par22oning further aligns with any business requirement Oracle wants to hear from you! Interes2ng use cases and implementa2ons Enhancement requests Complaints Hermann.Baer@oracle.com 44

Safe Harbor Statement The preceding is intended to outline our general product direc2on. It is intended for informa2on purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or func2onality, and should not be relied upon in making purchasing decisions. The development, release, and 2ming of any features or func2onality described for Oracle s products remains at the sole discre2on of Oracle. 45