Program Testing and Performance

Slides:



Advertisements
Similar presentations
Automating Tasks With Macros
Advertisements

Chapter 14 Chapter 14: Server Monitoring and Optimization.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Introduction to SQL Session 1 Retrieving Data From a Single Table.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
Chapter 8: Additional PROC SQL Features
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Creating and Managing Indexes Using Proc SQL Chapter 6 1.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
Administration and Monitoring the Database Oracle 10g.
© Dennis Shasha, Alberto Lerner, Philippe Bonnet 2004 DBMS Performance Monitoring.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
1 Chapter 1: Introduction 1.1: Course Logistics 1.2: Measuring Efficiencies 1.3: SAS DATA Step Processing.
© 2004 IBM Corporation IBM ^ z/VM Module 2: Conversational Monitor System (CMS)
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
Introduction to Using the Data Step Hash Object with Large Data Sets Richard Allen Peak Stat.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
1 Chapter 13 Parallel SQL. 2 Understanding Parallel SQL Enables a SQL statement to be: – Split into multiple threads – Each thread processed simultaneously.
Chapter 19: Introduction to Efficient SAS Programming 1 STAT 541 ©Spring 2012 Imelda Go, John Grego, Jennifer Lasecki and the University of South Carolina.
6.1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
IMS 4212: Database Implementation 1 Dr. Lawrence West, Management Dept., University of Central Florida Physical Database Implementation—Topics.
Oracle Business Intelligence Foundation – Testing and Deploying OBI Repository.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
In this session, you will learn to: Create and manage views Implement a full-text search Implement batches Objectives.
Dept. of Computer & Information Sciences
SQL Server Statistics and its relationship with Query Optimizer
Session 1 Retrieving Data From a Single Table
Chapter 10: Accessing Relational Databases (Self-Study)
SQL Trace and TKPROF.
How To Pass Oracle 1z0-060 Exam In First Attempt?
Justin Randall SQLintersection Session: Friday, 10:00am-11:15pm Automating SQL Server Administration Using SQLCMD Justin Randall.
Chapter 6: Set Operators
SQL and SQL*Plus Interaction
Creating LOVs and Editors
Advanced QlikView Performance Tuning Techniques
Chapter 19: Introduction to Efficient SAS Programming
Architecture Background
Two “identical” programs
Microsoft Access Illustrated
PROC SQL, Overview.
Root Cause Analysis with DMVs
Chapter 6: CPU Scheduling
Creating Macro Variables in SQL (Review)
Efficiency (Chapter 2).
Database Queries.
Noncorrelated subquery
Module 5: CPU Scheduling
Chapter5: CPU Scheduling
Global and Local Symbol Tables
Chapter 6: CPU Scheduling
Accounting Accounting collects information about users and processes
Lisa Mendez, PhD & Andrew Kuligowski
SQL Subquery.
Troubleshooting Techniques(*)
Managing Performance by SQL Tuning
Manipulating and Sharing Data in a Database
The INTERSECT Operator
3 Specifying Rows.
Creating Tables Create a new table by defining the column structure.
Setting SQL Procedure Options
3 Views.
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Module 5: CPU Scheduling
Performance Tuning ETL Process
Presentation transcript:

Program Testing and Performance 4 Program Testing and Performance

Testing and Performance Options Effect EXEC|NOEXEC controls whether or not submitted SQL statements are executed. NOSTIMER|STIMER reports performance statistics in the SAS log for each SQL statement. NOERRORSTOP| ERRORSTOP makes PROC SQL enter syntax-check mode after an error occurs; usually used in batch and non-interactive submissions.

Testing and Performance Options Display the columns that are retrieved when you use SELECT * in a query, and display any macro variable resolutions, but do not execute the query. %let big=100000; proc sql feedback noexec; select * from orion.Employee_payroll where salary>&big; quit;

Performance Benchmarking System performance issues are usually caused by bottlenecks in one of three major resources: CPU Memory Input/Output (I/O) An overload of any one of these resources can significantly increase the elapsed time required to execute your program.

Performance Benchmarking You can use the STIMER or FULLSTIMER options to gather information on how your SAS programs use CPU, memory, and I/O. The STIMER SAS system option causes SAS to print performance statistics in the SAS log for each DATA or PROC step executed. The FULLSTIMER option provides greater detail in performance reporting. Not all statistics are available on all operating systems, so the results might differ between operating environments. OPTIONS STIMER; OPTIONS FULLSTIMER;

Performance Benchmarking The STIMER option can also be specified as a PROC SQL option: proc sql stimer; When used in conjunction with the STIMER or FULLSTIMER SAS system option, the PROC SQL STIMER option provides CPU, memory, and I/O performance information for each individual statement executed by PROC SQL during a single invocation. This enables a more granular analysis of resource utilization.

Testing and Performance Options Example: Capture performance statistics for a complex query. options fullstimer; proc sql stimer; select distinct catx(' ',scan(Employee_Name,2,','), scan(Employee_Name,1,',')) format=$25. as Manager,City from orion.Order_Fact as of, orion.Product_Dim as pd, orion.Employee_Organization as eo, orion.Employee_Addresses as ea where of.Product_ID=pd.Product_ID and of.Employee_ID=eo.Employee_ID and ea.Employee_ID=eo.Manager_ID and Product_Name contains 'Expedition Zero' and year(Order_Date)=2003 and eo.Employee_ID ne 99999999 ; quit;

Benchmarking Guidelines Elapsed time is affected by concurrent tasks and should not normally be used for benchmarking. Always benchmark your programs in separate SAS sessions. If benchmarking is done on different methods within a single SAS session, statistics for the second method can be misleading. SAS might retain modules loaded into memory or the operating system might cache data read from a disk that was used in prior steps. continued...

Benchmarking Guidelines Run each program multiple times and average the performance statistics. Use realistic data for tests. Method A could be much more efficient than Method B when applied to small tables, but much less efficient on large tables.

SAS had been running about an hour. options fullstimer; proc sql stimer; create table counts as select app_id,count(app_id) from kag.train group by app_id ; quit;

Shutdown SAS, restart, immediately run