• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Scaling Data
 

Scaling Data

on

  • 726 views

 

Statistics

Views

Total Views
726
Views on SlideShare
726
Embed Views
0

Actions

Likes
0
Downloads
4
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Good Afternoon 1:30 – sorry cannot dim the lights 
  • What is Scaling – computer industry coining it’s own definition DATA – becoming more business critical every year
  • What is Scaling – computer industry coining it’s own definition DATA – becoming more business critical every year “Who would want such a thing” Who – us; spend the next hour with Andrew and myself as we explore data scaling from both the SAS and Oracle perspective. We will be focusing on: Scaling components within SAS V9 Scaling components within Oracle Information on how they will work together
  • Why Scale to Data – have to, business requirement, requirement of software solutions, required to deliver “the answer” – hardware till the end of the decade: Moore’s Law in tact 40 GHz Processors 1.5 TB Disks 4-12 GB RAM 4-8 CPU’s per chip Data: Late 90’s – 4TB to 300TB 300 Peta Bytes by 2012 1/3 Exabyte 300,000 TB 4500 Peta Bytes on the Internet Available Tools – SAS System 9 – features and components Available Procedures and Processes – SAS System 9 – Oracle 9i
  • For the next hour Andrew and I will discuss the meaning of scaling between SAS and Oracle: What you will learn about are some of the scaling features in SAS 9 and Oracle 9i. From this information you should be able to derive what scaling means to you and what scaling means to your organization.
  • Turn Silver into Gold
  • SAS System 9 – you are here; a tour through the intelligent architecture; different components and processes. What does the small pyramid represent – OS, Oracle, etc.
  • Some commentary on the product suite – the check* components and the enhancement they involve.
  • Libname engines in SAS V8 and their I/O process
  • Libname engines in SAS System 9 and their use of the threaded process – threaded read, support of threaded procedures and non-threaded procedures. SAS Procedures threaded for SAS System 9: Process for making it happen Libname options SAS options Procedure options
  • Either fully threaded or partial threaded procedures Discuss order by processing using proc sort
  • Option syntax and examples
  • SAS code examples
  • SAS code examples
  • SAS code examples
  • Controlling the threaded process: Libname Controls Procedures Controls How to use them
  • Run on a mid-frame Unix box with 16Gig of RAM and two CPU configs (mostly 8 but 12 in a few tests) Baseline Speedups The scalability measures discussed in the previous two sections compare performance of programs executing in one thread with the corresponding programs executing in multiple threads. Multithreading of SAS procedures requires significant modifications to the existing legacy code. The following sections detail typical speedups that you can obtain with some of the thread-enabled analytic procedures running on multiple CPU platforms. For most of the tests, this server was configured with eight 750 MHZ processors, but where explicitly noted, a configuration with twelve processors was used.
  • Other tests have been run with PROC SORT. This example illustrates the kind of performance increases in SORT on an 8-way unix box. The x axis is the number of records ranging from zero up to 10 million. The y-axis is the percent of maximum elapsed time. Note that threaded (in green) in this test is approximately 85% faster than single threaded processing on the same box. These tests were done for small key and large key sorts.
  • Methods to processing large data volumes, Organization of data, data marts, data bases is key.
  • Methods to processing large data volumes, Organization of data, data marts, data bases is key.
  • I am interested in hearing from you. If you would like copies of the presentation and/or sample SAS code drop me an e-mail, or put your request on your business card.
  • I am interested in hearing from you. If you would like copies of the presentation and/or sample SAS code drop me an e-mail, or put your request on your business card.

Scaling Data Scaling Data Presentation Transcript

  • Scaling SAS® Data Access to Oracle® RDBMS Howard Plemmons SAS Institute Inc. Andrew Holdsworth Oracle Corporation
  • Scaling
    • What is Scaling?
  • Scaling
    • “ To remove the scales of a fish”
    • “ To climb up by means of a scaling ladder”
    • “ To reach the highest point”
    • Data
  • Scaling Data
    • Why Scale to Data
  • Scaling Data
    • SAS tools, SAS/ACCESS ®
    • SAS Procedure and Processes
    • Oracle tools
    • Oracle Procedures and Processes
  • Intelligence Value Chain
  • Intelligence Value Chain Silver into Gold
  • SAS System 9
  • SAS V8 vs. SAS System 9 x Threaded Interface x x Fast Load x x Procedure Interface x x Libname Engine SAS System 9 SAS V8 FEATURE
  • SAS V8 I/O Model
  • Threaded Interface SAS 9
  • SAS Procedures
    • proc sort
    • proc summary
    • proc dmine
    • proc reg; proc dmreg
    • proc means
    • proc loess; proc dmdb
    • proc glm
    • proc robustreg
  • SAS/ACCESS® Engines
    • ORACLE
    • DB2
    • Informix
    • ODBC
    • Sybase
    • Teradata
  • Libname and SAS Procedure Controls
    • dbslice (“where”,”where”,…)
    • dbsliceparm (ALL,…)
    • defaults (THREADED_APPS,2)
    • options sastrace=‘,,t’;
    • procedure controls – CPU count
  • 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;
  • Options In Action - DBSLICE
    • libname x oracle user=scott pass=tiger;
    • proc print data=x.oratab (dbslice= (“where x<100”, “where x >= 100”) );
  • Options In Action – CPUCOUNT, THREADS
    • CPUCOUNT=
    • THREADS | NOTHREADS
  • Process
    • Libname controls
    • Procedure controls
    • Execution
  • Scalability – SAS 9 Threaded speedup in PROC REG Linear Scalability Achieved Speedup Run on 12-way Unix Box
  • Scalability – SAS 9 Threaded speedup in PROC SORT Run on 8-way Unix Box Tests run in memory cache
  • What Does This Mean - access
    • 393000 Rows
    • No Threads - baseline
    • Two Threads (DBSLICE) – 31%
    • Six Threads (DBSLICEPARM) – 54%
    Run on 10-way Unix Box Tests run in memory cache
  • Scaling Data
    • Data Volumes
    • Data ACCESS
    • Data Organization
    • Scaling using Oracle - Andrew
  • 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
  • The Star Query Fact Product Time Geography Customer
  • 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.
  • Star Query Optimization
    • The Optimization is 3 step Process
      • Apply query predicates to dimension tables to generate lists of foreign keys into the fact table.
      • Query the fact table using series of single column bit mapped indexes on the foreign keys
      • Having resolved the query within the fact table complete the query by joining back to dimension tables where needed and roll the query up.
  • Star Queries
    • To enable star queries the DBA should do the following
      • Build single column bitmapped indexes on each foreign key in the fact table
      • Build indexes on the dimension tables for query predicates
      • Build indexes on the dimension tables to assist in the join back and roll up process
      • Generate statistics for the schema
      • Set the parameter STAR_TRANSFORMATION_ENABLED=TRUE
  • 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
  • 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
  • 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
  • Specialist Indexes
    • B-Tree Indexes
    • Bit Mapped Indexes including join indexes
    • Functional Indexes
  • 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
  • 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
  • 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
  • Oracle9i Optimizer
    • Some common Optimizer problems seen with Oracle9i
      • Bad or incomplete statistics
      • Init.ora parameters influencing optimizer
      • SQL written for RBO
  • 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.
  • About the Speakers Howard Plemmons Andrew Holdsworth Senior Software Manager Director SAS Institute Inc. Oracle Corp. SAS Circle 500 Oracle Pkwy, Cary, NC Redwood Shores, CA94065 Phone: 919-531-7779 650-506-2938 E-mail: [email_address] [email_address]
  • Other SUGI Papers/Presentations
    • PC File Data Objects Directly from UNIX – 8:00am Tuesday
    • SAS/ACCESS and use of Metadata – Rm 619 @ 2:30
    • Lessons in Scalability – SAS Presents – 3:20 Tuesday
    • Data Warehousing section - performance
  • Scaling SAS Data ACCESS to ORACLE RDBMS
  • Copyright © 2003, SAS Institute Inc. All rights reserved.