Copyright © 2003, SAS Institute Inc. All rights reserved. SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries.

Slides:



Advertisements
Similar presentations
Using the SQL Access Advisor
Advertisements

Extreme Performance with Oracle Data Warehousing
1.
Tuning Oracle SQL The Basics of Efficient SQLThe Basics of Efficient SQL Common Sense Indexing The Optimizer –Making SQL Efficient Finding Problem Queries.
Introduction to SQL Tuning Brown Bag Three essential concepts.
Copyright © SoftTree Technologies, Inc. DB Tuning Expert.
Performance Tuning Compiled from: Oracle Database Administration, Session 13, Performance, Harvard U Oracle Server Tuning Accelerator, David Scott, Intec.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Database Performance Tuning and Query Optimization
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
BY LECTURER/ AISHA DAWOOD DW Lab # 4 Overview of Extraction, Transformation, and Loading.
What Happens when a SQL statement is issued?
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.
SQL SERVER 2012 XVELOCITY COLUMNSTORE INDEX Conor Cunningham Principal Architect SQL Server Engine.
1. Aim High with Oracle Real World Performance Andrew Holdsworth Director Real World Performance Group Server Technologies.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Designing a Data Warehouse
M ODULE 5 Metadata, Tools, and Data Warehousing Section 4 Data Warehouse Administration 1 ITEC 450.
Andrew Holdsworth Director Real World and ISV Performance Oracle Corporation Howard Plemmons Senior Software Manager SAS Institute Inc.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Designing a Data Warehouse Issues in DW design. Three Fundamental Processes Data Acquisition Data Storage Data a Access.
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
Introduction to Databases Chapter 8: Improving Data Access.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Database Technical Session By: Prof. Adarsh Patel.
Clif Kranish Director, Data Management Division DataMigrator Update Release
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
1 © 2012 OpenLink Software, All rights reserved. Virtuoso - Column Store, Adaptive Techniques for RDF Orri Erling Program Manager, Virtuoso Openlink Software.
Copyright © 2002, SAS Institute Inc. All rights reserved. SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries.
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 DB2 9 Fundamentals.
RBO RIP George Lumpkin Director Product Management Oracle Corporation Session id:
Data Partitioning in VLDB Tal Olier
11-1 Improve response time of interactive programs. Improve batch throughput. To ensure scalability of applications load vs. performance. Reduce system.
1 Chapter 14 DML Tuning. 2 DML Performance Fundamentals DML Performance is affected by: – Efficiency of WHERE clause – Amount of index maintenance – Referential.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Achieving Scalability, Performance and Availability on Linux with Oracle 9iR2-RAC Grant McAlister Senior Database Engineer Amazon.com Paper
1 Chapter 10 Joins and Subqueries. 2 Joins & Subqueries Joins – Methods to combine data from multiple tables – Optimizer information can be limited based.
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.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Copyright © 2003, SAS Institute Inc. All rights reserved. SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries.
1 Chapter 13 Parallel SQL. 2 Understanding Parallel SQL Enables a SQL statement to be: – Split into multiple threads – Each thread processed simultaneously.
Chapter 4 Logical & Physical Database Design
Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Performance Optimization.
SSIS – Deep Dive Praveen Srivatsa Director, Asthrasoft Consulting Microsoft Regional Director | MVP.
Scalable data access with Impala Zbigniew Baranowski Maciej Grzybek Daniel Lanza Garcia Kacper Surdy.
1 Copyright © 2009, Oracle. All rights reserved. Oracle Business Intelligence Enterprise Edition: Overview.
1 Chapter 8 Execution Plan Management. 2 Overview of Execution Plan Management Review techniques to – override optimizer – Improve optimizer’s decisions.
4 Copyright © Oracle Corporation, All rights reserved. Modeling the Data Warehouse.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
2 Copyright © 2008, Oracle. All rights reserved. Building the Physical Layer of a Repository.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
Tuning Oracle SQL The Basics of Efficient SQL Common Sense Indexing
Tips for Mastering Relational Databases Using SAS/ACCESS®
Optimizing SQL Queries
Database Performance Tuning and Query Optimization
Blazing-Fast Performance:
Enhance BI Applications and Simplify Development
Chapter 11 Database Performance Tuning and Query Optimization
Presentation transcript:

Copyright © 2003, SAS Institute Inc. All rights reserved. SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or Trademarks of their respective companies Scaling SAS® Data Access to Oracle® RDBMS Howard Plemmons SAS Institute Inc. Andrew Holdsworth Oracle Corporation

Copyright © 2003, SAS Institute Inc. All rights reserved. Scaling  What is Scaling?

Copyright © 2003, SAS Institute Inc. All rights reserved. Scaling  “To remove the scales of a fish”  “To climb up by means of a scaling ladder”  “To reach the highest point”  Data

Copyright © 2003, SAS Institute Inc. All rights reserved. Scaling Data  Why Scale to Data

Copyright © 2003, SAS Institute Inc. All rights reserved. Scaling Data  SAS tools, SAS/ACCESS®  SAS Procedure and Processes  Oracle tools  Oracle Procedures and Processes

Copyright © 2003, SAS Institute Inc. All rights reserved. Intelligence Value Chain

Copyright © 2003, SAS Institute Inc. All rights reserved. Intelligence Value Chain Silver into Gold

Copyright © 2003, SAS Institute Inc. All rights reserved. SAS System 9

Copyright © 2003, SAS Institute Inc. All rights reserved. SAS V8 vs. SAS System 9 FEATURESAS V8SAS System 9 Libname Engine xx Procedure Interface xx Fast Load xx Threaded Interface x

Copyright © 2003, SAS Institute Inc. All rights reserved. SAS V8 I/O Model

Copyright © 2003, SAS Institute Inc. All rights reserved. Threaded Interface SAS 9

Copyright © 2003, SAS Institute Inc. All rights reserved. SAS Procedures  proc sort  proc summary  proc dmine  proc reg; proc dmreg  proc means  proc loess; proc dmdb  proc glm  proc robustreg

Copyright © 2003, SAS Institute Inc. All rights reserved. SAS/ACCESS® Engines  ORACLE  DB2  Informix  ODBC  Sybase  Teradata

Copyright © 2003, SAS Institute Inc. All rights reserved. Libname and SAS Procedure Controls  dbslice (“where”,”where”,…)  dbsliceparm (ALL,…)  defaults (THREADED_APPS,2)  options sastrace=‘,,t’;  procedure controls – CPU count

Copyright © 2003, SAS Institute Inc. All rights reserved. Options In Action - DBSLICEPARM  -dbsliceparm none  option dbsliceparm=  libname x oracle user=scott pass=tiger dbsliceparm=(threaded_apps,2);  proc print data=y.oratab (dbsliceparm=(all,4)); run;

Copyright © 2003, SAS Institute Inc. All rights reserved. Options In Action - DBSLICE  libname x oracle user=scott pass=tiger;  proc print data=x.oratab (dbslice= (“where x = 100”) );

Copyright © 2003, SAS Institute Inc. All rights reserved. Options In Action – CPUCOUNT, THREADS  CPUCOUNT=  THREADS | NOTHREADS

Copyright © 2003, SAS Institute Inc. All rights reserved. Process  Libname controls  Procedure controls  Execution

Copyright © 2003, SAS Institute Inc. All rights reserved. Linear Scalability Achieved Speedup Scalability – SAS 9 Threaded speedup in PROC REG Run on 12-way Unix Box

Copyright © 2003, SAS Institute Inc. All rights reserved. Scalability – SAS 9 Threaded speedup in PROC SORT Run on 8-way Unix Box Tests run in memory cache

Copyright © 2003, SAS Institute Inc. All rights reserved. What Does This Mean - access  Rows  No Threads - baseline  Two Threads (DBSLICE) – 31%  Six Threads (DBSLICEPARM) – 54% Run on 10-way Unix Box Tests run in memory cache

Copyright © 2003, SAS Institute Inc. All rights reserved. Scaling Data  Data Volumes  Data ACCESS  Data Organization  Scaling using Oracle - Andrew

Copyright © 2003, SAS Institute Inc. All rights reserved. Scaling with  The Star Query  Use of Parallelism  Use of the Direct Path  Use of Specialist Indexes  Use of Analytical Functions  Use of Materialized Views  Use of The Oracle9i Optimizer

Copyright © 2003, SAS Institute Inc. All rights reserved. The Star Query Fact Product Time Geography Customer

Copyright © 2003, SAS Institute Inc. All rights reserved. Star Queries  The star query is a very common DW technique. It is highly optimized in Oracle and can be tuned depending on the type of queries. In summary the more known about the query composition the higher level of optimization possible.

Copyright © 2003, SAS Institute Inc. All rights reserved. Star Query Optimization  The Optimization is 3 step Process 1.Apply query predicates to dimension tables to generate lists of foreign keys into the fact table. 2.Query the fact table using series of single column bit mapped indexes on the foreign keys 3.Having resolved the query within the fact table complete the query by joining back to dimension tables where needed and roll the query up.

Copyright © 2003, SAS Institute Inc. All rights reserved. Star Queries – To enable star queries the DBA should do the following 1.Build single column bitmapped indexes on each foreign key in the fact table 2.Build indexes on the dimension tables for query predicates 3.Build indexes on the dimension tables to assist in the join back and roll up process 4.Generate statistics for the schema 5.Set the parameter STAR_TRANSFORMATION_ENABLED=TRUE

Copyright © 2003, SAS Institute Inc. All rights reserved. Use of Parallelism  Multiple CPUs to execute a single query as well multiple concurrent queries  Execute Table scans, Index probes and scans in parallel  Execute Joins and Sorts in parallel  Execute DML in parallel  Parallelism can be configured manually or automatically

Copyright © 2003, SAS Institute Inc. All rights reserved. Use of Partitioning  Partitioning was originally designed to allow management of large db objects however by partitioning data performance gains can be made by the following Partition pruning Join optimizations  Partitioning can be done by the following methods Range e.g. Data or key ranges List e.g. Discrete values such as State Hash to achieve equal size partitions  Two types of partitioning can be applied

Copyright © 2003, SAS Institute Inc. All rights reserved. Use of The Direct Path  By pass the conventional transaction layer to insert and copy data within the database  SQL*Loader is user currently by SAS  Other options include Insert with /*+ append */ hint Create Table as Select with NOLOGGING  These constructs can be used to transform vast amounts of data rapidly in parallel

Copyright © 2003, SAS Institute Inc. All rights reserved. Specialist Indexes  B-Tree Indexes  Bit Mapped Indexes including join indexes  Functional Indexes

Copyright © 2003, SAS Institute Inc. All rights reserved. Analytical Functions  Oracle has embraced the ANSI OLAP extensions to SQL  These permit faster response times on queries that would require multiple passes of the data with conventional SQL  This allows grouped results and functionality such as moving averages

Copyright © 2003, SAS Institute Inc. All rights reserved. Materialized Views  Materialized view allow automatic use of summary tables without a user having to re- write the query  Well designed materialized views are small in size and can increase performance by orders of magnitude.  Materialized views are in fact Oracle tables and can use all other features to improve performance

Copyright © 2003, SAS Institute Inc. All rights reserved. Oracle9i Optimizer  On upgrade of Oracle Releases the Optimizer behavior will change  The Optimizer is tested with over 400,000 SQL Statements Where plans change between releases the actual query is ran to test for degradation Slower plans are corrected  It is still important to have good representative Statistics  DBMS_STATS package allows parallel generation and migration of schema statistics

Copyright © 2003, SAS Institute Inc. All rights reserved. Oracle9i Optimizer  Some common Optimizer problems seen with Oracle9i Bad or incomplete statistics Init.ora parameters influencing optimizer SQL written for RBO

Copyright © 2003, SAS Institute Inc. All rights reserved. Summary  Oracle and SAS provide techniques for scaling to larger databases by optimizing both query performance and fetch performance.  These techniques are simple to adopt and allow huge productivity improvements  We have identified some core technologies here however this is a partial picture of the SAS/Oracle ability.

Copyright © 2003, SAS Institute Inc. All rights reserved. About the Speakers Howard PlemmonsAndrew Holdsworth Senior Software ManagerDirector SAS Institute Inc.Oracle Corp. SAS Circle500 Oracle Pkwy, Cary, NCRedwood Shores, CA94065 Phone:

Copyright © 2003, SAS Institute Inc. All rights reserved. Other SUGI Papers/Presentations PC File Data Objects Directly from UNIX – 8:00am Tuesday SAS/ACCESS and use of Metadata – Rm 2:30 Lessons in Scalability – SAS Presents – 3:20 Tuesday Data Warehousing section - performance

Copyright © 2003, SAS Institute Inc. All rights reserved. Scaling SAS Data ACCESS to ORACLE RDBMS

Copyright © 2003, SAS Institute Inc. All rights reserved. 40