 Overview  Smart Scan  Predicate Filtering  Column Projection  Join Filtering  Storage Indexes  Hybrid Columnar Compression  Flash Cache.

Slides:



Advertisements
Similar presentations
Maria Colgan & Thierry Cruanes
Advertisements

8 Copyright © 2005, Oracle. All rights reserved. Parallel Operations in Data Warehouses.
JDeveloper ADF and the Oracle database – friends not foes SAGE Computing Services Customised.
Extreme Performance with Oracle Data Warehousing
Exadata Embracing Change What is familiar and what is new? The statements and opinions expressed here are my own and do not necessarily represent those.
1.
Tuning Oracle SQL The Basics of Efficient SQLThe Basics of Efficient SQL Common Sense Indexing The Optimizer –Making SQL Efficient Finding Problem Queries.
Understanding SQL Server Query Execution Plans
Introduction to SQL Tuning Brown Bag Three essential concepts.
SQL Server performance tuning basics
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Jonathan Lewis EOUG Jun 2000 Execution Plans Agenda What are execution plans Where do you find execution plans Key mechanisms of execution Understanding.
1Jonathan Lewis EOUG Jun 2000 Execution Plans Explain Plan - part 2 Parallel - Partitions - Problems.
What Happens when a SQL statement is issued?
IO Waits Kyle Hailey #.2 Copyright 2006 Kyle Hailey Waits Covered in this Section  db file sequential read  db file scattered.
Exadata Distinctives Brown Bag New features for tuning Oracle database applications.
OLAP Tuning. Outline OLAP 101 – Data warehouse architecture – ROLAP, MOLAP and HOLAP Data Cube – Star Schema and operations – The CUBE operator – Tuning.
1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
© 2005 Julian Dyke juliandyke.com 1 V$SQL_PLAN  Introduced in Oracle  Shows actual execution plan in memory  Enhanced in Oracle 9.2 to include.
1. Aim High with Oracle Real World Performance Andrew Holdsworth Director Real World Performance Group Server Technologies.
Dos and don’ts of Columnstore indexes The basis of xVelocity in-memory technology What’s it all about The compression methods (RLE / Dictionary encoding)
Dot2Data Solutions Pvt. Ltd. A Databases Services Consultancy  It is like an appliance containing - Storage, Flash Disks, Database Servers, Infinib and.
David Konopnicki Choosing Access Path ä The basic methods. ä The access paths and when they are available. ä How the optimizer chooses among the.
Extreme Performance Data Warehousing
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any.
AN INTRODUCTION TO EXECUTION PLAN OF QUERIES These slides have been adapted from a presentation originally made by ORACLE. The full set of original slides.
SQL Tuning Ohio Oracle User’s Group October 2002 © Copyright, Kris T. Mason, 2002.
Executing Explain Plans and Explaining Execution Plans Craig Martin 01/20/2011.
A few things about the Optimizer Thomas Kyte
Lecture 8 Index Organized Tables Clusters Index compression
Oracle Database Administration Lecture 6 Indexes, Optimizer, Hints.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
Module 7 Reading SQL Server® 2008 R2 Execution Plans.
Ashwani Roy Understanding Graphical Execution Plans Level 200.
The Model Clause explained Tony Hasler, UKOUG Birmingham 2012 Tony Hasler, Anvil Computer Services Ltd.
Improving Database Performance Derrick Rapley
Mark Inman U.S. Navy (Naval Sea Logistics Center) Session #213 Analytic SQL for Beginners.
Parallel Execution Plans Joe Chang
Oracle tuning: a tutorial Saikat Chakraborty. Introduction In this session we will try to learn how to write optimized SQL statements in Oracle 8i We.
Oracle Database Performance Secrets Finally Revealed Greg Rahn & Michael Hallas Oracle Real-World Performance Group Server Technologies.
1 Chapter 13 Parallel SQL. 2 Understanding Parallel SQL Enables a SQL statement to be: – Split into multiple threads – Each thread processed simultaneously.
Turbocharge SQL Performance with Oracle Database 12c Philip Moore Senior Data Architect and Developer.
J.NemecAre Your Statistics Bad Enough?1 Verify the effectiveness of gathering optimizer statistics Jaromir D.B. Nemec UKOUG
Chapter 5 Index and Clustering
Page 1 © Hortonworks Inc – All Rights Reserved Hive: Data Organization for Performance Gopal Vijayaraghavan.
Query Processing – Implementing Set Operations and Joins Chap. 19.
8 Copyright © 2005, Oracle. All rights reserved. Gathering Statistics.
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP,MCP. SQL SERVER Database Administration.
Execution Plans Detail From Zero to Hero İsmail Adar.
Same Plan Different Performance Mauro Pagano. Consultant/Developer/Analyst Oracle  Enkitec  Accenture DBPerf and SQL Tuning Training Tools (SQLT, SQLd360,
LAB: Web-scale Data Management on a Cloud Lab 11. Query Execution Plan 2011/05/27.
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP SQL SERVER Database Administration.
Indexes 22 Index Table Key Row pointer … WHERE key = 22.
Exadata Distinctives 988 Bobby Durrett US Foods. What is Exadata? Complete Oracle database platform Disk storage system Unique to Exadata – intelligent.
Tuning Transact-SQL Queries
CPS216: Data-intensive Computing Systems
Query Tuning without Production Data
Scaling SQL with different approaches
Query Tuning without Production Data
Query Tuning without Production Data
Choosing Access Path The basic methods.
Exadata for Oracle DBAs
Database Performance Tuning and Query Optimization
Four Rules For Columnstore Query Performance
Physical Join Operators
Azure SQL Data Warehouse Performance Tuning
Statistics: What are they and How do I use them
Four Rules For Columnstore Query Performance
Chapter 11 Database Performance Tuning and Query Optimization
All about Indexes Gail Shaw.
Presentation transcript:

 Overview  Smart Scan  Predicate Filtering  Column Projection  Join Filtering  Storage Indexes  Hybrid Columnar Compression  Flash Cache

 Predicate Filtering  Column Projection  Function Offload  Simple Joins Filtering  Storage Indexes Данные приходят в PGA не в привычном формате Oracle блока, а в виде пакетов, содержащих только необходимые данные. Всегда осуществляется параллельными процессами на storage cell layer. Как следствие степень (degree) of parallelism уменьшена для запросов использующих параллелизм по сравнению с не-Exadata environments.

 Full Scan Full Table Scan Full MatView Scan Index [Bitmap] Fast Full Scan  Direct Path Read Происходит при  parallel processing влияют: св-во CACHE объекта, parallel_degree=AUTO  serial Direct Path Reads влияют: _small_table_trashold, cache_size, кол-во блоков объекта в кеше и т.д.  Stored on the Exadata Storage Function performed Smart scan executed from function performed Direct Path Read, performed from Full Scans. Может быть отключен на system/session/statement levels: Пример: alter session set cell_offload_processing=FALSE, select --+ opt_param(‘cell_offload_processing’, ‘false’)

 Возвращаются только необходимые столбцы  Бенефит в уменьшении объема передаваемых данных со Storage Cells на DB tier

 Позволяет проталкивать предикаты на уровень Storage Cells. Возвращаются строки удовлетворяющие предикатам  SQL функции могут быть offloaded. Почти все одно строчные и почти никакие аггрегатные и аналитические.  select * from v$sqlfn_metadata where offloadable = 'YES'  Бенефит в уменьшении объема передаваемых данных со Storage Cells на DB tier

Query: select * from T where id = 'A '; Plan: | Id | Operation | Name | | 0 | SELECT STATEMENT | | |* 1 | TABLE ACCESS STORAGE FULL| T | Predicate Information (identified by operation id): storage(“ID"='A ') filter(“ID"='A ') “STORAGE” в операции TABLE ACCESS STORAGE FULL говорит о том, что объект будет читаться со storage cell. storage(“ID"='A ') в секции Predicate Information говорит о том, что Smart Scan с predicate filtering возможен Note: Перед миграцией на Exadata планы запросов можно смотреть установив CELL_OFFLOAD_PLAN_DISPLAY = ALWAYS (default AUTO, включается только когда работает на Exadata)

SQL> alter session set "_serial_direct_read"=always; Session altered SQL> alter session set cell_offload_processing=false; Session altered SQL> select count(*) 2 from t; COUNT(*) Executed in 36,375 seconds

SQL> alter session set "_serial_direct_read"=always; Session altered SQL> alter session set cell_offload_processing=false; Session altered SQL> select count(*) 2 from t; COUNT(*) Executed in 36,375 seconds SESSION EVENTS EVENT TOTAL_WAITS direct path read 3002 SESSION STATS NAME VALUE cell physical IO interconnect bytes cell physical IO bytes eligible for predicate offload 0 cell physical IO interconnect bytes returned by smart scan 0 cell scans 0

SQL> alter session set "_serial_direct_read"=always; Session altered SQL> alter session set cell_offload_processing=true; Session altered SQL> select count(*) 2 from t; COUNT(*) Executed in 10,297 seconds

SQL> alter session set "_serial_direct_read"=always; Session altered SQL> alter session set cell_offload_processing=true; Session altered SQL> select count(*) 2 from t; COUNT(*) Executed in 10,297 seconds SESSION EVENTS: EVENT TOTAL_WAITS cell smart table scan 124 SESSION STATS NAME VALUE cell physical IO bytes eligible for predicate offload cell physical IO interconnect bytes returned by smart scan cell physical IO interconnect bytes cell scans 1

SQL> alter session set "_serial_direct_read"=always; Session altered SQL> alter session set "_kcfis_storageidx_disabled"=true; Session altered SQL> select count(*) 2 from t 3 where ACCT_ID = 'A '; COUNT(*) Executed in 4,703 seconds

SQL> alter session set "_serial_direct_read"=always; Session altered SQL> alter session set "_kcfis_storageidx_disabled"=true; Session altered SQL> select count(*) 2 from t 3 where ACCT_ID = 'A '; COUNT(*) Executed in 4,703 seconds SESSION EVENTS EVENT TOTAL_WAITS cell smart table scan 170 SESSION STATS NAME VALUE cell physical IO bytes eligible for predicate offload cell physical IO interconnect bytes cell physical IO interconnect bytes returned by smart scan cell scans 1

 Bloom Filters используются в Oracle начиная с 10.2  Позволяет проталкивать bloom filters на Storage Cells уровень  Бенефит в уменьшении передачи ненужных данных со storage на DB level  Отключается параметром “_bloom_predicate_pushdown_to_storage“=false  Статистика фильтрации в представлении v$sql_join_filter

select --+ parallel(t1 2) parallel(t2 2) count(*) from t1, t2 where t1.id = c.id and t1.col1 = 'A'; | Id | Operation | Name | Rows | TQ |IN-OUT| PQ Distrib | | 0 | SELECT STATEMENT | | 3812G| | | | | 1 | PX COORDINATOR | | | | | | | 2 | PX SEND QC (RANDOM) | :TQ10002 | 3812G| Q1,02 | P->S | QC (RAND) | |* 3 | HASH JOIN BUFFERED | | 3812G| Q1,02 | PCWP | | | 4 | JOIN FILTER CREATE | :BF0000 | 6182M| Q1,02 | PCWP | | | 5 | PX RECEIVE | | 6182M| Q1,02 | PCWP | | | 6 | PX SEND HASH | :TQ10000 | 6182M| Q1,00 | P->P | HASH | | 7 | PX BLOCK ITERATOR | | 6182M| Q1,00 | PCWC | | |* 8 | TABLE ACCESS STORAGE FULL| T1 | 6182M| Q1,00 | PCWP | | | 9 | PX RECEIVE | | 13G| Q1,02 | PCWP | | | 10 | PX SEND HASH | :TQ10001 | 13G| Q1,01 | P->P | HASH | | 11 | JOIN FILTER USE | :BF0000 | 13G| Q1,01 | PCWP | | | 12 | PX BLOCK ITERATOR | | 13G| Q1,01 | PCWC | | |* 13 | TABLE ACCESS STORAGE FULL| T2 | 13G| Q1,01 | PCWP | | Predicate Information (identified by operation id): access("T1"."ID"="T2"."ID") 8 - storage("T1"."COL1"='A') filter("T1"."COL1"='A') 13 - storage(SYS_OP_BLOOM_FILTER(:BF0000,"T2"."ID")) filter(SYS_OP_BLOOM_FILTER(:BF0000,"T2"."ID"))

| Id | Operation | Name | Rows | TQ |IN-OUT| PQ Distrib | | 0 | SELECT STATEMENT | | 1 | | | | | 1 | SORT AGGREGATE | | 1 | | | | | 2 | PX COORDINATOR | | | | | | | 3 | PX SEND QC (RANDOM) | :TQ10001 | 1 | Q1,01 | P->S | QC (RAND) | | 4 | SORT AGGREGATE | | 1 | Q1,01 | PCWP | | |* 5 | HASH JOIN | | 2132 | Q1,01 | PCWP | | | 6 | PX RECEIVE | | 2132 | Q1,01 | PCWP | | | 7 | PX SEND BROADCAST | :TQ10000 | 2132 | Q1,00 | P->P | BROADCAST | | 8 | PX BLOCK ITERATOR | | 2132 | Q1,00 | PCWC | | |* 9 | TABLE ACCESS STORAGE FULL| T3 | 2132 | Q1,00 | PCWP | | | 10 | PX BLOCK ITERATOR | | 1464M| Q1,01 | PCWC | | |* 11 | TABLE ACCESS STORAGE FULL | T4 | 1464M| Q1,01 | PCWP | | Predicate Information (identified by operation id): access(“T3".“ID"="T4".“ID") 9 - storage(“T4"."JRNL_QTY"=( )) filter("T4"."JRNL_QTY"=( )) 11 - storage(SYS_OP_BLOOM_FILTER(:BF0000,“T3".“ID")) filter(SYS_OP_BLOOM_FILTER(:BF0000,"T3".“ID")) select --+ full(t3) full(t4) parallel(t3 2) parallel(t4 2) count(*) from t3, t4 where t3.id = t4. id and t4.jrnl_qty = ;

SQL> alter session set "_bloom_predicate_pushdown_to_storage"=false; Session altered SQL> select --+ full(t3) full(t4) parallel(t3 2) parallel(t4 2) 2 count(*) 3 from t3, t4 4 where t3.id = t4.id and t4.jrnl_qty = ; COUNT(*) Executed in 101,141 seconds SQL> alter session set "_bloom_predicate_pushdown_to_storage"=true; Session altered SQL> select --+ full(t3) full(t4) parallel(t3 2) parallel(t4 2) 2 count(*) 3 from t3, t4 4 where t3.actg_trn_id = t4.ant_hold_jrnl_id and t4.jrnl_qty = ; COUNT(*) Executed in 13,61 seconds

SQL> select decode(qc_session_id, 793, 1, 2) execution, filtered, probed, probed - filtered as sent from v$sql_join_filter where qc_session_id in (793, 886); EXECUTION FILTERED PROBED SENT

 Бенефит в уменьшении читаемого объема данных  Строится для сегмента (например, партиция таблицы)  Во время SmartScan, при условии, что есть  Единственное средство мониторинга : статистика “ cell physical IO bytes saved by storage index”  Лучший эффект достигается на хорошо кластеризованных данных или около минимумов/максимумов любой кластеризации  Работает с простыми операторами сравнения =,, =, BETWEEN, IN, IS NULL, IS NOT NULL. Работает с bind variables  Не работает с != и %  Хранится только в памяти, а не на диске  Поддерживаются автоматически  Можно отключить alter session set "_kcfis_storageidx_disabled"=true;

SALES (TABLE) SALE_IDTYPESHIP_DATE 300DVD GIFT BOOK ……… 790BOOK DVD BOOK Storage index on the column SHIP_DATE region Idx MinMaxNull N ……… Y ……….. 1 Mb region 1 Mb region

SALES (TABLE) SALE_IDTYPESHIP_DATE 300DVD GIFT BOOK ……… 790BOOK DVD BOOK Storage index on the column SHIP_DATE region Idx MinMaxNull N ……… Y ……….. 1 Mb region 1 Mb region select * from sales where ship_date = ‘ ’ Сканироваться будет регион 6, регион 1 будет пропущен

 Доступ только к необходимым партициям блягодаря partition pruning  С помощью Full Scan  В режиме direct path read (либо parallel processing, либо serial direct path read)  Соединение таблиц с помощью HJ, чтобы способствовать проталкиванию bloom filters

 Compression always performed on DB tier  Decompression could be offloaded only if Smart  Хранится в Compression Units (обычно 32К или 64К). CU может занимать несколько Oracle блоков Compression Unit Block Header CU header Column 1 Column 2 Block Header Column 2Column 3 Column 4 Column 5 Block Header Column 6Column 7 Column 8 Column 9

 Призван уменьшать время одно/мульти-блочных чтений  Может быть использован для SmartScan тех объектов, для которых CELL_FLASH_CACHE = KEEP  alter table test storage (cell_flash_cache keep)

1.Запрос на чтение блока 2.Одновременно посылается запрос на чтение с диска и с FlashCache 3.Тот ответ, который быстрее пришел выдается в DB Имеет возможность одновременно посылать запрос на чтение с диска и с FlashCache

1.Запрос на запись блока 2.Запись блока на диск 3.Подтверждение успешной записи 4.Помещение блока в кеш при условии, что данные оцениваются как необходимые для кеширования Запись происходит на диск, минуя FlashCache