57
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH How Autonomous is the Oracle Autonomous Data Warehouse? Christian Antognini / Dani Schnider @ chrisantognini antognini.ch/blog @ dani_schnider danischnider.wordpress.com

How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH

How Autonomous is the Oracle Autonomous Data Warehouse?Christian Antognini / Dani Schnider

@chrisantognini antognini.ch/blog

@dani_schnider danischnider.wordpress.com

Page 2: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Agenda

How Autonomous is the Oracle Autonomous Data Warehouse?2 20.09.18

1. Introduction

2. Set Up

3. Connectivity

4. Loading Data

5. ETL Performance

6. Query Performance

7. Monitoring Performance

8. Miscellaneous

9. Conclusion

Page 3: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?3 20.09.18

Introduction

Page 4: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Larry Ellison, ATP Announcement, 7th August 2018

How Autonomous is the Oracle Autonomous Data Warehouse?4 20.09.18

“There is nothing to learn,there is nothing to do”

Page 5: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Autonomous Data Warehouse Cloud

How Autonomous is the Oracle Autonomous Data Warehouse?5 20.09.18

Automated Database Administration

«…you do not need to configure or manage any hardware, or install any software. Autonomous Data Warehouse handles creating the data warehouse, backing up the database, patching and upgrading the database, and growing or shrinkingthe database.»

Automated Performance Tuning

«When you use Autonomous Data Warehouse, no tuning is necessary. You do not need to consider any details about parallelism, partitioning, indexing, or compression. The service automatically configures the database for high-performance queries.»

Source: Using Oracle Autonomous Data Warehouse, Chapter 1https://docs.oracle.com/en/cloud/paas/autonomous-data-warehouse-cloud/user/getting-started.html#GUID-4B91499D-7C2B-46D9-8E4D-A6ABF2093414

Page 6: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?6 20.09.18

Set Up

Page 7: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Creating

How Autonomous is the Oracle Autonomous Data Warehouse?7 20.09.18

Name

Number of CPU (1..128) Storage (1..128 TB)

PDB admin password

Tags (optional)

License type

Page 8: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Scale Up/Down

How Autonomous is the Oracle Autonomous Data Warehouse?8 20.09.18

At any moment, without downtime, it’s possible to scale up/down the number of CPU and the available storage

Page 9: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Initialization Parameters That Can Be Modified

How Autonomous is the Oracle Autonomous Data Warehouse?9 20.09.18

APPROX_FOR_AGGREGATION

APPROX_FOR_COUNT_DISTINCT

APPROX_FOR_PERCENTILE

AWR_PDB_AUTOFLUSH_ENABLED1

OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES2

OPTIMIZER_IGNORE_HINTS

OPTIMIZER_IGNORE_PARALLEL_HINTS

PLSCOPE_SETTINGS

PLSQL_CCFLAGS

PLSQL_DEBUG

PLSQL_OPTIMIZE_LEVEL

PLSQL_WARNINGS

TIME_ZONE2

NLS_*

1System level only 2Session level only

Page 10: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Resource Manager

How Autonomous is the Oracle Autonomous Data Warehouse?10 20.09.18

A plan (DWCS_PLAN) with three consumer groups is pre-configured

Consumer Group CPU Session Pool PX Server Limit DOP Limit

HIGH 4 Unlimited 50 CPU_COUNT1

MEDIUM 2 Unlimited 84 4

LOW 1 2*CPU_COUNT1 1

OTHER_GROUPS 1 Unlimited 1

1When several instances are used, CPU_COUNT <> “CPU Core Count”

Page 11: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Resource Manager – Run Away Queries

How Autonomous is the Oracle Autonomous Data Warehouse?11 20.09.18

Except for OTHER_GROUPS, two thresholds to configure when queries are cancelled can be set

Run time in secondsAmount of disk I/O in MB

Remark:0 = detection disabled

Page 12: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?12 20.09.18

Connectivity

Page 13: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How to Connect to Autonomous Data Warehouse Cloud

How Autonomous is the Oracle Autonomous Data Warehouse?13 20.09.18

Tool Purpose Connection MethodService Console service management

browserApache Zeppelin Oracle Machine Learning

SQL Developer development,ad-hoc queries

JDBC(automatic configuration)

SQL*Plus, SQLcl, Toad, ... development,ad-hoc queries OCI, JDBC, ODBC

(manual configuration)ETL Tools (ODI, 3rd party) data integration services

BI Tools (OBIEE, 3rd party) BI services

Page 14: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Service Management via Browser

How Autonomous is the Oracle Autonomous Data Warehouse?14 20.09.18

Used forService Console

Start/Stop DBScale up/down

Restore

Management of credential

Page 15: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Oracle Machine Learning

How Autonomous is the Oracle Autonomous Data Warehouse?16 20.09.18

Notebook style application for advanced SQL users

Apache ZeppelinInteractive data analysis

Graphical reports

Typical UsersData scientists

DevelopersBusiness users

Page 16: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Connection with SQL Developer

How Autonomous is the Oracle Autonomous Data Warehouse?17 20.09.18

Download client credential fileVia Service Console

Create new connectionType “Cloud PDB”

Import credential file

Enter keystore password(only for versions < 18.2)

Select service level(LOW, MEDIUM, HIGH)

Page 17: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Manual Connection Configuration

How Autonomous is the Oracle Autonomous Data Warehouse?18 20.09.18

Connections using Oracle Net Services (SQL*Net)For SQL*Plus, SQLcl, Toad, ...

ETL and BI tools, 3rd party tools

Encrypted SSL connection

Wal

let /

Key

stor

e

Oracle Call Interface (OCI)

JDBC OCI

JDBC Thin Client

ODBC

AutonomousData Warehouse

Cloud

Oracle Cloud

Wal

let /

Key

stor

e

TCP/IP

Page 18: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?19 20.09.18

Loading Data

Page 19: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

client computercloud

Loading Data

How Autonomous is the Oracle Autonomous Data Warehouse?20 20.09.18

Oracle SQL*Loader

3rd party application

command-line interface

HTTPS / REST

object storage service

OracleObject Storage

Amazon Simple Storage

Service (S3)

Microsoft Azure Blob Storage

HTTPS / REST

SQL*Net

SQL*Net

Page 20: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Object Storage Service (OSS)

How Autonomous is the Oracle Autonomous Data Warehouse?21 20.09.18

ADW supports the following object storage servicesOracle’s Object Storage

Amazon Simple Storage Service (S3)Microsoft’s Azure Blob Storage

Those services store data as objects within buckets (containers)

Objects are identified with an URI

The access to the objects stored within buckets is protected

Credentials managed through DBMS_CLOUD are used

Page 21: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Command Line Interface (CLI)

How Autonomous is the Oracle Autonomous Data Warehouse?22 20.09.18

Oracle provides a CLI to work with Oracle Cloud Infrastructure (OCI) objects and services

The CLI is built on Python and runs on Windows, Linux and Mac

The CLI makes calls to the OCI API

Among other things, the CLI can be used to manage buckets and objects stored in the supported OSS

Page 22: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

DBMS_CLOUD

How Autonomous is the Oracle Autonomous Data Warehouse?23 20.09.18

It provides features tomanage credentials to access an OSS

manage external tables that can be used to query data stored in an OSShandle objects stored in an OSS

handle files stored on ADW in DATA_PUMP_DIR

Data Pump 12.2 supports importing (but not exporting) a file stored in an OSS

ALTER DATABASE PROPERTY SET default_credential = 'ADMIN.CHRIS'

impdp dumpfile=default_credentials:https://…/test.dmp

Page 23: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example – Loading Data into a 1TB TPC-DS Schema (1)

How Autonomous is the Oracle Autonomous Data Warehouse?24 20.09.18

Step 1: Upload the text files from the file system of a server hosted in the cloud (same region) to the Oracle’s object storage

By default, such a statement uses 10 parallel threads

The load took 6 hours

Step 2: Load the data into the database through DBMS_CLOUD

The number of allocated CPU cores determines how fast data is loaded

With 32 cores it took 67 minutes

oci os object bulk-upload --bucket-name tpcds--src-dir /data/tpcds--include "*.dat"

Page 24: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example – Loading Data into a 1TB TPC-DS Schema (2)

How Autonomous is the Oracle Autonomous Data Warehouse?25 20.09.18

Example of scalability: load 22GB into the CATALOG_RETURNS table

source: https://antognini.ch/2018/07/observations-about-the-scalability-of-data-loads-in-adwc/

Page 25: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?26 20.09.18

ETL Performance

Page 26: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Prepared for High ETL Performance

How Autonomous is the Oracle Autonomous Data Warehouse?27 20.09.18

Good ETL performance is possible

Setup is optimized for DWH and ETL

But details must be considered

Page 27: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Parallel DML Execution and Direct-Path Operations

How Autonomous is the Oracle Autonomous Data Warehouse?28 20.09.18

Parallel DML (PDML) is enabled by defaultOnly if CPU core count > 1 and consumer group is MEDIUM or HIGH

Hint /*+ parallel */ can be added (usually not needed)– Set optimizer_ignore_parallel_hints = FALSE (default: TRUE)

Direct-Path INSERT is used

For parallel DMLIf hint /*+ append */ is added

Page 28: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Parallel DML Execution and Consumer Groups

How Autonomous is the Oracle Autonomous Data Warehouse?29 20.09.18

---------------------------------------------------------------------------------------| Id | Operation | Name | TQ |IN-OUT| PQ Distrib |---------------------------------------------------------------------------------------| 0 | INSERT STATEMENT | | | | || 1 | LOAD AS SELECT | CUSTOMERS_1 | | | || 2 | PX COORDINATOR | | | | || 3 | PX SEND QC (RANDOM) | :TQ10000 | Q1,00 | P->S | QC (RAND) || 4 | OPTIMIZER STATISTICS GATHERING | | Q1,00 | PCWC | || 5 | PX BLOCK ITERATOR | | Q1,00 | PCWC | || 6 | TABLE ACCESS STORAGE FULL | CUSTOMERS | Q1,00 | PCWP | |---------------------------------------------------------------------------------------

- automatic DOP: Computed Degree of Parallelism is 8

--------------------------------------------------| Id | Operation | Name |--------------------------------------------------| 0 | INSERT STATEMENT | || 1 | LOAD TABLE CONVENTIONAL | CUSTOMERS_1 || 2 | TABLE ACCESS STORAGE FULL| CUSTOMERS |--------------------------------------------------

- automatic DOP: Computed Degree of Parallelism is 1 because of no expensive parallel operation- PDML disabled because object is not decorated with parallel clause- Direct Load disabled because no append hint given and not executing in parallel

MEDIUM

HIGH

LOW

Page 29: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Parallel DML / Direct-Path and Constraints

How Autonomous is the Oracle Autonomous Data Warehouse?30 20.09.18

Restrictions must be considered:If FK constraints are defined,PDML / direct-path is disabledConventional load is used

Recommendation:

Define reliable constraints

----------------------------------------------------| Id | Operation | Name |----------------------------------------------------| 0 | INSERT STATEMENT | || 1 | LOAD TABLE CONVENTIONAL | CUSTOMERS_1 || 2 | PX COORDINATOR | || 3 | PX SEND QC (RANDOM) | :TQ10000 || 4 | PX BLOCK ITERATOR | || 5 | TABLE ACCESS STORAGE FULL| CUSTOMERS |----------------------------------------------------

Note-----

- automatic DOP: Computed Degree of Parallelism is 8- PDML disabled because parent referential constraintsare present

ALTER TABLE customers_1ADD FOREIGN KEY (country_id) REFERENCES countriesRELY DISABLE NOVALIDATE

Page 30: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Online Statistics Gathering for Direct-Path Loads

How Autonomous is the Oracle Autonomous Data Warehouse?31 20.09.18

Statistics are gathered

automatically

Unlike 12c, this works also

for non-empty tables

for histograms

Two new undocumented parameters

_optimizer_gather_stats_on_load_all (default: TRUE)

_optimizer_gather_stats_on_load_hist (default: TRUE)

------------------------------------------------------| Id | Operation | Name |------------------------------------------------------| 0 | INSERT STATEMENT | || 1 | LOAD AS SELECT | TARGET || 2 | PX COORDINATOR | || 3 | PX SEND QC (RANDOM) | :TQ10000 || 4 | OPTIMIZER STATISTICS GATHERING | || 5 | PX BLOCK ITERATOR | || 6 | TABLE ACCESS STORAGE FULL | SOURCE |------------------------------------------------------

Page 31: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Statistics Gathering for Conventional Loads

How Autonomous is the Oracle Autonomous Data Warehouse?32 20.09.18

Attention: statistics are not gathered automatically

Call DBMS_STATS with default values

Automatic Statistics Gathering job is enabled, but maintenance windows are disabled

Page 32: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

No Indexes

How Autonomous is the Oracle Autonomous Data Warehouse?33 20.09.18

Indexes are not allowed in ADW

Good! Avoids many ETL performance issues

Indexes are not needed for (most) analytical queries

Exception: indexes are created for primary key and unique constraints

CREATE INDEX s_order_item_delivery_date_idxON s_order_item (delivery_date);

ORA-01031: insufficient privileges

Page 33: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Index Maintenance (PK and Unique Constraints)

How Autonomous is the Oracle Autonomous Data Warehouse?34 20.09.18

Index maintenance after direct-path load

Very time-consuming, cannot be parallelized

Workaround: create PK with RELY DISABLE NOVALIDATE

Page 34: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Hybrid Columnar Compression

How Autonomous is the Oracle Autonomous Data Warehouse?35 20.09.18

All tables are automatically HCC compressed, with row-level locking enabled

SELECT table_name, compression, compress_forFROM user_tables ORDER BY table_name

TABLE_NAME COMPRESS COMPRESS_FOR ------------------ --------- -----------------------------H_BEER ENABLED QUERY HIGH ROW LEVEL LOCKING H_BOTTLING ENABLED QUERY HIGH ROW LEVEL LOCKING H_BREW ENABLED QUERY HIGH ROW LEVEL LOCKING H_CUSTOMER ENABLED QUERY HIGH ROW LEVEL LOCKING H_MALT ENABLED QUERY HIGH ROW LEVEL LOCKING H_ORDER ENABLED QUERY HIGH ROW LEVEL LOCKING …

Page 35: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example: Loading Data Vault Schema

How Autonomous is the Oracle Autonomous Data Warehouse?36 20.09.18

Data Vault Model of Craft Beer Brewery

25 target tables (Hubs, Links, Satellites)

20 beers, 272K customers

16M orders, 173M order items

“Daily loads” for 8 months

– Random data generator

– Data Vault load patterns

– Delta detection and versioning

– 1.4M order items / day

L_MALT_PORTION*P L_Malt_Portion_Key*F H_Beer_Key*F H_Malt_KeyLoad_DateRecord_Source

L_BEER_BREW*P L_Beer_Brew_Key*F H_Beer_Key*F H_Brew_KeyLoad_DateRecord_Source

L_BREW_BOTTLING*P L_Beer_Bottling_Key*F H_Brew_Key*F H_Bottling_KeyLoad_DateRecord_Source

L_SAL_MALT*P L_SAL_Malt_Key*F H_Primary_Malt_Key*F H_Alternative_Malt_KeyLoad_DateRecord_Source

H_BEER*P H_Beer_Key

U Beer_NameLoad_DateRecord_Source

H_BREW*P H_Brew_Key

U Brew_NoLoad_DateRecord_Source

H_BOTTLING*P H_Bottling_Key

U Beer_NameU Best_Before_Date

Load_DateRecord_Source

H_MALT*P H_Malt_Key

U Malt_NameLoad_DateRecord_Source

L_BEER_ORDER_ITEM*P L_Beer_Order_Item_Key*F H_Beer_Key*F H_Order_Item_KeyLoad_DateRecord_Source

H_ORDER_ITEM*P H_Order_Item_Key

U Order_NoU Line_No

Load_DateRecord_Source

S_ORDER_ITEM*PF H_Order_Item_Key*P Load_DateDelivery_DateQuantityPrice_per_UnitPrice_TotalRecord_Source

S_BEER_DESCRIPTION*PF H_Beer_Key*P Load_DateStyleABVIBUSeasonalLabel_ColorRecord_Source

S_RECIPE*PF H_Beer_Key*P Load_DateStart_TempMashing_Time_1Mashing_Temp_1Mashing_Time_2Mashing_Temp_2Mashing_Time_3Mashing_Temp_3Mashing_Time_4Mashing_Temp_4Bowling_TimeHop_Type_1Hop_Quantity_1Hop_Time_1Hop_Type_2Hop_Quantity_2Hop_Time_2Hop_Type_3Hop_Quantity_3Hop_Time_3YeastRecord_Source

S_MALT_PORTION*PF L_Malt_Portion_Key*P Load_DateQuantity_kgRecord_Source

S_MALT_DESCRIPTION*PF H_Malt_Key*P Load_DateMalt_Short_NameMalt_Long_NameProducerEBCPrice_per_UnitPrice_per_kgUnit_SizeRecord_Source

S_MALT_STOCK*PF H_Malt_Key*P Load_DateUnits_on_Stockkg_on_StockRecord_Source

S_BREW_JOURNAL*PF H_Brew_Key*P Load_DateBrew_DateBrewerMashing_Start_TimestampMashing_Rest_1_TimestampMashing_Rest_2_TimestampMashing_Rest_3_TimestampMashing_Rest_4_TimestampMashing_End_TimestampSparging_Start_TimestampSparging_End_TimestampBoling_Start_TimestampHop_1_Adding_TimestampHop_2_Adding_TimestampHop_3_Adding_TimestampBoling_End_TimestampYeast_Adding_TimestampOriginal_GravityFinal_GravitityABVRecord_Source

S_BOTTLING*PF H_Bottling_Key*P Load_DateBottling_DateQuantity_in_LiterNumber_of_BottlesRecord_Source

L_ORDER_ITEM*P L_Order_Item_Key*F H_Order_Key*F H_Order_Item_KeyLoad_DateRecord_Source

H_ORDER*P H_Order_Key

U Order_NoLoad_DateRecord_Source

S_INVOICE*PF H_Order_Key*P Load_DateTotal_AmountInvoice_DatePayment_DateRecord_Source

L_CUSTOMER_ORDER*P L_Customer_Order_Key*F H_Customer_Key*F H_Order_KeyLoad_DateRecord_Source

H_CUSTOMER*P H_Customer_Key

U Customer_NoLoad_DateRecord_Source

S_CUSTOMER_INFO*PF H_Customer_Key*P Load_DatePreferred_ContactE_Mail_AddressPhone_NumberPrivate_PersonResellerDelivery_TypeRecord_Source

S_CUSTOMER_ADDRESS*PF H_Customer_Key*P Load_DateLast_NameFirst_NameStreetStreet_NoZIP_CodeCityRecord_Source

Page 36: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example: Loading Data Vault Schema

How Autonomous is the Oracle Autonomous Data Warehouse?37 20.09.18

4 CPUs

8 CPUs

21

Page 37: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?38 20.09.18

Query Performance

Page 38: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Result Cache

How Autonomous is the Oracle Autonomous Data Warehouse?39 20.09.18

It is enabled by default on ADW

RESULT_CACHE_MODE = FORCE

For queries being re-executed, it can lead to a tremendous performance improvement

To avoid caching, use the NO_RESULT_CACHE hint

Even if OPTIMIZER_IGNORE_HINTS = TRUE (default on ADW)

Page 39: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Improve Query Performance

How Autonomous is the Oracle Autonomous Data Warehouse?40 20.09.18

What cannot be donePartition tablesCreate materialized viewsUse In-Memory Column StoreCreate indexes(except for PK/UK)

What can be doneScale up the number of CPU coresUse different serviceUse constraints to enable query transformations(e.g. join elimination)

Page 40: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Are Queries on a Star Schema Optimized?

How Autonomous is the Oracle Autonomous Data Warehouse?41 20.09.18

Since no index is automatically created, the star transformation is not available

Instead, the query optimizer can use the vector transformation

Introduced in 12.1.0.2 for In-Memory Aggregation

In many situations, faster than star transformation

Works even if tables are not populated in IMCS

In-Memory is enabled (but not used) in ADW– INMEMORY_SIZE = 1073741824

Note-----

- vector transformation used for this statement

Page 41: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example – TPC-DS Queries

How Autonomous is the Oracle Autonomous Data Warehouse?42 20.09.18

174

9055

31

175

91 90 90

305 305 311 303

0

50

100

150

200

250

300

350

2 CPU Cores 4 CPU Cores 8 CPU Cores 16 CPU Cores

Query 38 – Execution Time in Seconds

HIGHMEDIUMLOW

Service

Page 42: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example – Sample Star Schema Benchmark (SSB)

How Autonomous is the Oracle Autonomous Data Warehouse?43 20.09.18

2 millions

2 millions

30 millions

2556

6 billions

Page 43: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example – Sample Star Schema Benchmark (SSB)

How Autonomous is the Oracle Autonomous Data Warehouse?44 20.09.18

189

0,01

42

0,0115

0,010

50

100

150

200

1st Exec 2nd Exec

Query 1 (1 Dimension, 1 Fact Table, 1 Aggregated Row)

4 CPU Cores8 CPU Cores16 CPU Cores

Page 44: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Example – Sample Star Schema Benchmark (SSB)

How Autonomous is the Oracle Autonomous Data Warehouse?45 20.09.18

413

362

132 120

42 44

050

100150200250300350400450

1st Execution 2nd Execution

Query 14 (4 Dimensions, 1 Fact Table, 800 Rows)

4 CPU Cores8 CPU Cores16 CPU Cores

Page 45: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Automated Tuning?

How Autonomous is the Oracle Autonomous Data Warehouse?46 20.09.18

source: https://www.oracle.com/database/data-warehouse.html

Result cache?(in addition to disk I/O caching)Exadata

storage indexes?

Not observed L

Page 46: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?47 20.09.18

Monitoring Performance

Page 47: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Monitoring Performance and SQL Statements

How Autonomous is the Oracle Autonomous Data Warehouse?48 20.09.18

Service Console with monitoring capabilities:Activity and utilization

– Storage and CPU usage– Real-time or time period

Running SQL statements

– Time & wait statistics, I/O statistics– Runtime execution plan

– Parallel processes– Downloadable real-time SQL Monitoring report

Default 8 days, can be changed with AWR

settings

Page 48: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?49 20.09.18

Page 49: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Monitoring Performance with AWR and ASH Reports

How Autonomous is the Oracle Autonomous Data Warehouse?50 20.09.18

ASH reports can be generated based onV$ACTIVE_SESSION_HISTORY / DBA_HIST_ACTIVE_SESS_HISTORY

SQL Developer reports

AWR reports can be generated (only on PDB level)With DBMS_WORKLOAD_REPOSITORY

With SQL Developer reports

SELECT output FROM TABLE(DBMS_WORKLOAD_REPOSITORY.AWR_REPORT_HTML

(3951758934, 7, 3524, 3535))

Page 50: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?54 20.09.18

Miscellaneous

Page 51: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Backup & Recovery

How Autonomous is the Oracle Autonomous Data Warehouse?58 20.09.18

Automatic (incremental) backups take place dailyThe start time cannot be set

The retention period for automatic backups is 60 days

Manual backups can be initiated through the console

They are stored in the object store

The DEFAULT_CREDENTIAL and DEFAULT_BUCKETS database properties must be set

Recovery at any point-in-time can be initiated through the console

Page 52: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Patching

How Autonomous is the Oracle Autonomous Data Warehouse?59 20.09.18

Oracle is patching the service on a regular basisNo announcement

No downtime

There is no way to “schedule” when the installation of the patches takes place

Page 53: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Oracle Support

How Autonomous is the Oracle Autonomous Data Warehouse?60 20.09.18

As soon as a problem cannot be solve because of missing privileges, an SR has to be opened

Support has (almost) no visibility

E.g. no access to the alert.log of the PDB

E.g. no OS access

Support relies on Operations to fix things

The issues we experienced were fixed in a time frame going from one days to one week

Page 54: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

How Autonomous is the Oracle Autonomous Data Warehouse?62 20.09.18

Conclusion

Page 55: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Conclusion

How Autonomous is the Oracle Autonomous Data Warehouse?63 20.09.18

Appropriate setup for DWH

Better than many manual configured DWHs

Easy (limited) administration, ready to use

No partitioning, no In-Memory (yet)

Support in case of a service request can take too long

Sometimes “shaky” (no control about patches / changes)

Not as simple as it looks at first sight

Knowhow about physical DB design still important !✗

Page 56: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Further Information in Blog Posts

How Autonomous is the Oracle Autonomous Data Warehouse?64 20.09.18

DBMS_CLOUD Package – A Reference Guidehttps://antognini.ch/2018/07/dbms_cloud-package-a-reference-guide/

Which Privileges Are Required to Use the ADWC Service Console?https://antognini.ch/2018/07/which-privileges-are-required-to-use-the-adwc-service-console/

Observations About the Scalability of Data Loads in ADWChttps://antognini.ch/2018/07/observations-about-the-scalability-of-data-loads-in-adwc/

External Tables in Autonomous Data Warehouse Cloudhttps://danischnider.wordpress.com/2018/07/04/external-tables-in-autonomous-data-warehouse-cloud/

Gathering Statistics in the Autonomous Data Warehouse Cloudhttps://danischnider.wordpress.com/2018/07/11/gathering-statistics-in-the-autonomous-data-warehouse-cloud/

10 Tips to Improve ETL Performance – Revised for ADWChttps://danischnider.wordpress.com/2018/07/20/10-tips-to-improve-etl-performance-revised-for-adwc/

Star Schema Optimization in Autonomous Data Warehouse Cloudhttps://danischnider.wordpress.com/2018/09/13/star-schema-optimization-in-autonomous-data-warehouse-cloud/

Page 57: How Autonomous is the Oracle Autonomous Data Warehouse?€¦ · 08.12.2019  · Larry Ellison, ATP Announcement, 7th August 2018 4 20.09.18 How Autonomous is the Oracle Autonomous

Questions and Answers…Christian AntogniniDani Schnider

20.09.18 How Autonomous is the Oracle Autonomous Data Warehouse?65

@chrisantognini antognini.ch/blog

@dani_schnider danischnider.wordpress.com