ICS 421 Spring 2010 Performance Tuning Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 4/15/20101Lipyeow.

Slides:



Advertisements
Similar presentations
Spatial (or N-Dimensional) Search in a Relational World Jim Gray, Microsoft Alex Szalay, Johns Hopkins U.
Advertisements

Spatial (or N-Dimensional) Search in a Relational World Jim Gray.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
Union “join” two tables – the same number of columns select RA2000, DEC2000, TWOMASSID from TWOMASS WHERE ID
ICS 421 Spring 2010 Transactions & Recovery Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/4/20101Lipyeow.
ICS 624 Spring 2011 Overview of DB & IR Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/12/20111Lipyeow.
Physical Database Design Data Migration/Conversion.
IBM Software Group ® Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
ICS 321 Fall 2009 Project Presentation Template Team Name Team Members 11/19/20091Lipyeow Lim -- University of Hawaii at Manoa.
ICS 421 Spring 2010 Data Warehousing 3 Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 4/1/20101Lipyeow.
ICS 421 Spring 2010 Indexing (1) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 02/18/20101Lipyeow Lim.
ICS 421 Spring 2010 Indexing (2) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 2/23/20101Lipyeow Lim.
ICS 421 Spring 2010 Relational Query Optimization Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 9/8/20091Lipyeow.
ICS 421 Spring 2010 Transactions & Concurrency Control (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
ICS 624 Spring 2011 Multi-Dimensional Clustering Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/24/20111Lipyeow.
ICS 421 Spring 2010 Distributed Transactions Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/16/20101Lipyeow.
ICS 421 Spring 2010 Data Warehousing (1) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/18/20101Lipyeow.
Midterm Review Lecture 14b. 14 Lectures So Far 1.Introduction 2.The Relational Model 3.Disks and Files 4.Relational Algebra 5.File Org, Indexes 6.Relational.
Chapter 6: Database Evolution Title: AutoAdmin “What-if” Index Analysis Utility Authors: Surajit Chaudhuri, Vivek Narasayya ACM SIGMOD 1998.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
Summary. Chapter 9 – Triggers Integrity constraints Enforcing IC with different techniques –Keys –Foreign keys –Attribute-based constraints –Schema-based.
CPSC-608 Database Systems Fall 2010 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
Chapter 17 Methodology – Physical Database Design for Relational Databases Transparencies © Pearson Education Limited 1995, 2005.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Team Dosen UMN Physical DB Design Connolly Book Chapter 18.
DBMS 3. course. Reminder Data independence: logical and physical Concurrent processing – Transaction – Deadlock – Rollback – Logging ER Diagrams.
Performance and Scalability. Performance and Scalability Challenges Optimizing PerformanceScaling UpScaling Out.
ICS 499 Projects Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 12/7/20111Lipyeow Lim -- University of.
Practical Database Design and Tuning. Outline  Practical Database Design and Tuning Physical Database Design in Relational Databases An Overview of Database.
Triggers Event handlers in the DBMS. Triggers are event handlers Triggers a executed when an event happens in the DBMS Example events – INSERT, UPDATE.
Lecture 9 Methodology – Physical Database Design for Relational Databases.
Computer Science 101 Database Concepts. Database Collection of related data Models real world “universe” Reflects changes Specific purposes and audience.
ICS 321 Spring 2011 High Level Database Models Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 2/7/20111Lipyeow.
ICS 321 Fall 2011 Overview of Storage & Indexing (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 11/9/20111Lipyeow.
1 Database Management Systems: part of the solution or part of the problem? Clive Page 2004 April 28.
Chapter 16 Practical Database Design and Tuning Copyright © 2004 Pearson Education, Inc.
ICS 321 Fall 2009 SQL: Queries, Constraints, Triggers Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 9/8/20091Lipyeow.
ICS 321 Fall 2009 Introduction to Database Systems Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
ICS 321 Fall 2011 Constraints, Triggers, Views & Indexes Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
ICS 321 Fall 2009 The Relational Model (ii) Asst. Prof. Lipyeow Lim Information and Computer Science Department University of Hawaii at Manoa 9/10/20091Lipyeow.
ICS 321 Fall 2009 DBMS Application Programming Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 10/06/20091Lipyeow.
ICS 321 Fall 2011 The Relational Model of Data (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 8/29/20111Lipyeow.
ICS 321 Fall 2010 SQL in a Server Environment (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 11/1/20101Lipyeow.
Advanced Database CS-426 Week 1 - Introduction. Database Management System DBMS contains information about a particular enterprise Collection of interrelated.
09/03/2009Lipyeow Lim -- University of Hawaii at Manoa 1 ICS 321 Fall 2009 Introduction to Database Design Asst. Prof. Lipyeow Lim Information & Computer.
ICS 321 Fall 2011 The Database Language SQL (iv) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 10/26/20111Lipyeow.
Dec 8, 2003Murali Mani Constraints B term 2004: lecture 15.
ICS 321 Spring 2011 The Database Language SQL (iii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/14/20111Lipyeow.
Fall 2010 ICS321 Data Storage & Retrieval Mon & Wed 12-1:15 PM Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at.
Recent spatial work by Jim Gray and Alex Szalay Bob Mann.
ICS 421 Spring 2010 Relational Model & Normal Forms Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/19/20101Lipyeow.
DBMS 3. course. Reminder Data independence: logical and physical Concurrent processing – Transaction – Deadlock – Rollback – Logging ER Diagrams.
1 CS 430 Database Theory Winter 2005 Lecture 11: SQL DDL.
Elastic Data Partitioning for Cloud-based SQL Processing Systems Lipyeow Lim Information & Computer Science Department University of Hawai`i at Mānoa 9/8/20101Lipyeow.
ICS 321 Spring 2011 Introduction to Database Systems Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/12/20111Lipyeow.
January 23, 2016María Nieto-Santisteban – AISRP 2003 / Pittsburgh1 High-Speed Access for an NVO Data Grid Node María A. Nieto-Santisteban, Aniruddha R.
Your Data Any Place, Any Time Performance and Scalability.
Chapter 8 Views and Indexes 第 8 章 视图与索引. 8.1 Virtual Views  Views:  “virtual relations”. Another class of SQL relations that do not exist physically.
ICS 321 Fall 2011 Algebraic and Logical Query Languages (ii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at.
Spatial Searches in the ODM. slide 2 Common Spatial Questions Points in region queries 1.Find all objects in this region 2.Find all “good” objects (not.
Practical Database Design and Tuning
CS 540 Database Management Systems
CS422 Principles of Database Systems Course Overview
Physical Design and Tuning Example
Rob Gleasure robgleasure.com
Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
TAP Standards and Feedback
Query Processing.
LSST, the Spatial Cross-Match Challenge
Presentation transcript:

ICS 421 Spring 2010 Performance Tuning Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 4/15/20101Lipyeow Lim -- University of Hawaii at Manoa

Performance Tuning Given a database – Tables (schema etc) – Data a workload – Queries and their frequency – Updates and their frequency DBMS software running on some hardware What knobs can you play with to improve performance ? 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa2

Knobs & Factors Knobs Indexes Query rewriting Table schema Locking Logging Hardware Memory Factors Data Size Budget Purpose Workload – Read intensive vs write intensive – Types of queries – Frequencies 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa3

Query 100: Brute Force Cone Search SELECT O.objID, O.ra, O.dec, O.htmid, O.zoneid FROM Object O WHERE ( SIN(RADIANS(O.dec)) * SIN(RADIANS( +0.5)) + COS(RADIANS(O.dec)) * COS(RADIANS( +0.5)) * COS(RADIANS((O.ra) - (67.5))) ) >= COS(RADIANS( 1.0/60.0)) 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa4 dec ra x (67.5,0.5) y

Query 101: Prefiltering using ZoneID SELECT O.objID, O.ra, O.dec, O.htmid, O.zoneid FROM Object O WHERE (zoneid BETWEEN FLOOR(( ( 1.0/60.0))/ ) AND FLOOR(( (1.0/60.0))/ )) AND ( SIN(RADIANS(O.dec)) * SIN(RADIANS( +0.5)) + COS(RADIANS(O.dec)) * COS(RADIANS( +0.5)) * COS(RADIANS((O.ra) - (67.5))) ) >= COS(RADIANS( 1.0/60.0)) 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa5 dec ra

Query 103: Prefiltering using a Pyramid SELECT O.objID, O.ra, O.dec, O.htmid, O.zoneid FROM Object O WHERE (O.ra BETWEEN ((67.5)-( 1.0/60.0)) AND ((67.5)+( 1.0/60.0))) AND (O.dec BETWEEN (( +0.5)-( 1.0/60.0)) AND (( +0.5)+( 1.0/60.0))) AND ( SIN(RADIANS(O.dec)) * SIN(RADIANS( +0.5)) + COS(RADIANS(O.dec))* COS(RADIANS( +0.5)) * COS(RADIANS((O.ra) - (67.5))) ) >= COS(RADIANS( 1.0/60.0)) 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa6 dec ra x (67.5,0.5) y

Query 110: Join with Detection SELECT O.objID, O.ra, O.dec, O.htmid, O.zoneid, D.detectid FROM Object O, Detection D WHERE O.objid=D.objid AND ( SIN(RADIANS(O.dec)) * SIN(RADIANS( +0.5)) + COS(RADIANS(O.dec)) * COS(RADIANS( +0.5)) * COS(RADIANS((O.ra) - (67.5))) ) >= COS(RADIANS( 1.0/60.0)) 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa7

Schema for Object & Detection CREATE TABLE Object ( objID BIGINT, htmID BIGINT, zoneID INT, ra DOUBLE, dec DOUBLE, cx DOUBLE, cy DOUBLE, cz DOUBLE, lambda FLOAT, beta FLOAT, l FLOAT, b FLOAT, lsg FLOAT, bsg FLOAT, gMagBest REAL, rMagBest REAL, iMagBest REAL, zMagBest REAL, yMagBest REAL, grColor REAL, riColor REAL, izColor REAL, zyColor REAL, sgSep REAL ) 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa8 CREATE TABLE Detection ( objID BIGINT, detectID BIGINT, filterID SMALLINT, imageID BIGINT, obsTime FLOAT, raObs FLOAT, decObs FLOAT, mag REAL, sky REAL, sgSep REAL ) ;

Horizontal Decomposition CREATE TABLE DETECTION201001(....) CREATE TABLE DETECTION201002(....) CREATE TABLE DETECTION201003(....) ALTER TABLE DETECT ADD CONSTRAINT CHK_JAN CHECK (MONTH(obsTime) =1);... INSERT INTO CREATE VIEW DETECTION AS SELECT * FROM DETECTION UNION ALL SELECT * FROM DETECTION UNION ALL SELECT * FROM DETECTION /15/2010Lipyeow Lim -- University of Hawaii at Manoa9

Performance Tuning Tools Explain Not getting the right plans ? runstats Twisting the arm of the optimizer using selectivity clause Event Monitors Other smart tools – Index advisors – Schema advisors – Query patroller 4/15/2010Lipyeow Lim -- University of Hawaii at Manoa10