© 2010 IBM Corporation Information Management Using Snapshot monitor SQL Administrative Views for Performance Analysis on V10.1 Anthony Reina - Accelerated.

Slides:



Advertisements
Similar presentations
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
Advertisements

Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
© 2010 IBM Corporation Information Management Basic Handling of DB2 Issue with IBM Support Anthony Reina - Accelerated Value Specialist
Copyright © 2011 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. SQL Workshop Day 4.
IBM Software Group ® Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
Clarity Educational Community Clarity Educational Community Creating and Tuning SQL Queries that Engage Users.
Database Administration
1 Internal Table / DB Alternatives Analysis of Various Table Lookup Approaches.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
IBM Software Group Washington Area Informix User Group Forum 2004 The DB2 DBA Checklist Dwaine R Snow, DB2 & Informix.
© 2010 IBM Corporation Information Management Performance Enhancements for DB2 V10.1 Anthony Reina - Accelerated Value Specialist
Functions Lesson 10. Skills Matrix Function A function is a piece of code or routine that accepts parameters and stored as an object in SQL Server. The.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Stanford Linear Accelerator Center November 15, 2000Lee Ann Yasukawa1 Archive Data to ORACLE The Prototype PEPII model.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
IBM Software Group ® DB2 Performance Expert for Multiplatforms Version 2.1 Step-by-step tutorial.
SQL Server 2000 Acropolis Institute of Technology and Research Database fundamentals Prepared By: Rahul Patel.
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.
The Self-Managing Database: Guided Application and SQL Tuning Mohamed Ziauddin Consulting Member of Technical Staff Oracle Corporation Session id:
Administration and Monitoring the Database Oracle 10g.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Chapter 2: SQL – The Basics Objectives: 1.The SQL execution environment 2.SELECT statement 3.SQL Developer & SQL*Plus.
Project 2003 Presentation Ben Howard 15 th July 2003.
Introduction to the Adapter Server Rob Mace June, 2008.
Siebel 8.0 Module 5: EIM Processing Integrating Siebel Applications.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 12 Understanding database managers on z/OS.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
By Shanna Epstein IS 257 September 16, Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the.
1 Introduction to Oracle Chapter 1. 2 Before Databases Information was kept in files: Each field describes one piece of information about student Fields.
© 2008 IBM Corporation November 17, 2015 Informix Administration Overview John F. Miller III March 2008.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Database Concepts Track 3: Managing Information using Database.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
7 Strategies for Extracting, Transforming, and Loading.
Deep understanding of DB2 and Snapshots monitoring and Administrative view Sharad D. Pawar ACI Payment system.
Visual Basic for Application - Microsoft Access 2003 Finishing the application.
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
Week 7 Lecture Part 2 Introduction to Database Administration Samuel S. ConnSamuel S. Conn, Asst Professor.
for all Hyperion video tutorial/Training/Certification/Material Essbase Optimization Techniques by Amit.
Lu Wei1 Outline Introduction Basic SQL Setting Up and Using PostgreSQL Advanced SQL Embeded SQL.
SCHOOL MANAGEMENT SYSTEM Developed by: Swapnil R. Gohil ( )
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
INTRODUCTION TO DATABASES (MICROSOFT ACCESS)
Table spaces.
CS320 Web and Internet Programming SQL and MySQL
SQL Server Monitoring Overview
The IBM DB2 Certification Program
Department of Information Technology
Database Management  .
Introduction of Week 3 Assignment Discussion
Migration Strategies – Business Desktop Deployment (BDD) Overview
Introduction to DataBase
Chapter 9 Database and Information Management.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
CS3220 Web and Internet Programming SQL and MySQL
Chapter 11 Managing Databases with SQL Server 2000
CS3220 Web and Internet Programming SQL and MySQL
Introduction to MySQL NELINET October 28th, 2005.
ENCRYPTION with Oracle Advanced Security
Presentation transcript:

© 2010 IBM Corporation Information Management Using Snapshot monitor SQL Administrative Views for Performance Analysis on V10.1 Anthony Reina - Accelerated Value Specialist

© 2010 IBM Corporation Information Management 2 The IBM Software Accelerated Value Program delivers a proactive, cost-reducing, and productivity enhancing advisory service. The program pairs you with an assigned team who build a foundational understanding of your overall environment. Through that understanding, the trusted partner works to facilitate faster deployment, lifecycle leadership, risk mitigation, and more by identifying ways to improve your environment, staff skill set, and processes. IBM Software Accelerated Value Program

© 2010 IBM Corporation Information Management 3 AGENDA  Introduction  Snapshot Administrative Views  Usage/Example

© 2010 IBM Corporation Information Management 4 Introduction Often times we encounter situations where increase in the workload against the database starts hindering overall database performance. Although this can be caused by the environment configurations, changes to the system, resource bottleneck, or simply increase in workload. It’s very possible queries running on the database are not running optimal as expected. Different methods for identifying long running sql’s…  DB2 Snapshots (ie. Application, Dynamic, etc…)  DB2 Diagnostics (ie. db2pd, db2fodc –perf/hang)  3 rd Party Monitoring Tools  DB2 Access Plans  Snapshot Administrative Views

© 2010 IBM Corporation Information Management 5 Snapshot Administrative Views System Defined Provide a primary, easy to use programmatic interface. Includes a collection of…  Built-in views  Table functions  Procedures  Scalar functions for various DB2 task Can be invoked from…  SQL Based application  DB2 Command Line  Command Script DFT_MONT_STMT and DFT_MON_TIMESTAMP dbm cfg should be enabled.

© 2010 IBM Corporation Information Management 6 Snapshot Administrative Views APPL_PERFORMANCE displays information about the percentage of rows selected by an application. LONG_RUNNING_SQL returns SQL statements executed in the currently connected database. This can be used to verify long-running SQL statements in the database. QUERY_PREP_COST returns a list of statements with information about the time required to prepare the statement. TOP_DYNAMIC_SQL returns the top dynamic SQL statements sortable by number of executions, average execution time, number of sorts, or sorts per statement.

© 2010 IBM Corporation Information Management 7 Snapshot Administrative Views APPL_PERFORMANCE Column NameData TypeDescription SNAPSHOT_TIMESTAMPTIMESTAMPThe date and time the snapshot was taken. AUTHIDVARCHAR (128)Authorization ID APPL_NAMEVARCHAR (256)Application Name AGENT_IDBIGINTAgent ID / Application Handle PERCENT_ROWS_SELECTEDDECIMAL (5,2)The percent of rows read from disk that were actually returned to the application. DBPARTITIONNUMSMALLINTThe database partition from which the data was retrieved for this row. MEMBERSMALLINTNumeric identifier for the database member from which the data was retrieved.

© 2010 IBM Corporation Information Management 8 Snapshot Administrative Views LONG_RUNNING_SQL Column NameData TypeDescription SNAPSHOT_TIMESTAMPTIMESTAMPThe date and time the snapshot was taken. ELAPSED_TIME_MININTEGERElapsed time of the statement in minutes. AGENT_IDBIGINTAgent ID / Application Handle APPL_NAMEVARCHAR (256)Application Name APPL_STATUSVARCHAR (22)Application Status (ie. CONNECTED, UOWEXEC, UOWWAIT, BACKUP, etc.) AUTHIDVARCHAR (128)Authorization ID INBOUND_COMM_ADDRESSVARCHAR (32)Inbound Communication Address STMT_TEXTCLOB (16 M)Statement Text DBPARTITIONNUMSMALLINTThe database partition from which the data was retrieved for this row. MEMBERSMALLINTNumeric identifier for the database member from which the data was retrieved.

© 2010 IBM Corporation Information Management 9 Snapshot Administrative Views QUERY_PREP_COST Column NameData TypeDescription SNAPSHOT_TIMESTAMPTIMESTAMPThe date and time the snapshot was taken. NUM_EXECUTIONSBIGINTThe number of times that an SQL statement has been executed. AVERAGE_EXECUTION_TIME_SBIGINTAverage execution time in seconds. AVERAGE_EXECUTION_TIME_MSBIGINTAverage execution time in – fractional, in seconds PREP_TIME_MSBIGINTThe longest amount of time in microseconds that was required to prepare a specific SQL statement. PREP_TIME_PERCENTDECIMAL (5,2)Percent of execution time spent on preparation. STMT_TEXTCLOB (16 M)Statement Text DBPARTITIONNUMSMALLINTThe database partition from which the data was retrieved for this row. MEMBERSMALLINTNumeric identifier for the database member from which the data was retrieved.

© 2010 IBM Corporation Information Management 10 Snapshot Administrative Views TOP_DYNAMIC_SQL Column NameData TypeDescription SNAPSHOT_TIMESTAMPTIMESTAMPThe date and time the snapshot was taken. NUM_EXECUTIONSBIGINTThe number of times that an SQL statement has been executed. AVERAGE_EXECUTION_TIME_SBIGINTAverage execution time in seconds. STMT_SORTSBIGINTThe total number of times that a set of data SORTS_PER_EXECUTIONBIGINTNumber of sorts per statement execution. STMT_TEXTCLOB (2 M)Statement Text DBPARTITIONNUMSMALLINTThe database partition from which the data was retrieved for this row. MEMBERSMALLINTNumeric identifier for the database member from which the data was retrieved.

© 2010 IBM Corporation Information Management 11 Example Scenario : Two set of workload is run from the environment identified as run_wkld1 and run_wkld2. DB2 DBA, would like to identify what are the queries being run from the two workload processand identify potential SQL problems.

© 2010 IBM Corporation Information Management 12 Example Use APPL_PERFORMANCE to see what applications are running…

© 2010 IBM Corporation Information Management 13 Example APPL_PERFORMANCE view output The db2bp for AGENT_ID 75, 8, and 7 would more likely to be running SQL’s.

© 2010 IBM Corporation Information Management 14 Example Use LONG_RUNNING_SQL to identify longest running queries that are currently being executed…

© 2010 IBM Corporation Information Management 15 Example LONG_RUNNING_SQL view output 1 st data collected AGENT_ID 8 and 7 is running for 1 min. and actual query is identified.

© 2010 IBM Corporation Information Management 16 Example LONG_RUNNING_SQL view output 2 nd data collected AGENT_ID 8 and 7 is running for 3 min. and actual query is identified.

© 2010 IBM Corporation Information Management 17 Example Use QUERY_PREP_COST_TIME to determined how frequent a query is run as well as average execution time for each query…

© 2010 IBM Corporation Information Management 18 Example QUERY_PREP_COST view output Q1 Q2/ AGENT_ID 8 Q3 Q4 Q5/ AGENT_ID 7

© 2010 IBM Corporation Information Management 19 Example Use TOP_DYNAMIC_SQL to determine most frequently executed and longest-running SQL statements…

© 2010 IBM Corporation Information Management 20 Example TOP_DYNAMIC_SQL view output Q1 Q2/ AGENT_ID 8 Q3 Q4 Q5/ AGENT_ID 7

© 2010 IBM Corporation Information Management 21 Other Snapshot Admin Views BP_HITRATIO returns bufferpool hit ratios, including total, data, XDA, ratio, and index hit ratio. CONTAINER_UTILIZATION returns information about the table space containers and utilization rates. LOG_UTILIZATION returns information for the currently connected database per partition. Full list of Snapshot Admin Views

© 2010 IBM Corporation Information Management 22 Questions?