CSC317/MCS9317. Database Performance Tuning. Class test

Size: px
Start display at page:

Download "CSC317/MCS9317. Database Performance Tuning. Class test"

Transcription

1 CSC317/MCS9317 Database Performance Tuning Class test 7 October 2015 Please read all instructions (including these) carefully. The test time is approximately 120 minutes. The test is close book and close notes, no other written material. There are 5 questions, with a total of 20 marks for the test. Please read through the entire question set before getting started, in order to plan your strategy accordingly. Please write your solutions in the spaces provided below the questions. You can also use the blank areas and back of the test pages for scratch work. Please do not bring any scratch paper with you. Please write neatly and clearly. You may get as few as 0 points if we cannot understand your solution. Student Number: Do not forget to sign the pledge below: I declare that I have never given nor received assistance on this test. SIGNATURE:

2 Introduction The questions 1, 2, 3, 4, and 5 of the midsession test are related to the following simplified version of TPC-H benchmark database used in the laboratory classes. CUSTOMER( C_CUSTKEY NUMBER(12) NOT NULL, C_NAME VARCHAR(25) NOT NULL, C_ADDRESS VARCHAR(40) NOT NULL, C_NATIONKEY NUMBER(12) NOT NULL, CONSTRAINT CUSTOMER_PKEY PRIMARY KEY(C_CUSTKEY) ); PART( P_PARTKEY NUMBER(12) NOT NULL, P_NAME VARCHAR(55) NOT NULL, P_BRAND CHAR(10) NOT NULL, P_AMOUNT NUMBER(12) NOT NULL, P_RETAILPRICE NUMBER(12,2) NOT NULL, CONSTRAINT PART_PKEY PRIMARY KEY (P_PARTKEY) ); PARTSUPP( PS_PARTKEY NUMBER(12) NOT NULL, PS_SUPPNAME VARCHAR(55) NOT NULL, PS_AVAILQTY NUMBER(12) NOT NULL, CONSTRAINT PARTSUPP_PKEY PRIMARY KEY (PS_PARTKEY,PS_SUPPNAME) ); ORDERS( O_ORDERKEY NUMBER(12) NOT NULL, O_CUSTKEY NUMBER(12) NOT NULL, O_TOTALPRICE NUMBER(12,2) NOT NULL, O_DATE DATE NOT NULL, CONSTRAINT ORDERS_PKEY PRIMARY KEY (O_ORDERKEY), CONSTRAINT ORDERS_FKEY1 FOREIGN KEY (O_CUSTKEY) REFERENCES CUSTOMER(C_CUSTKEY) ); LINEITEM( L_ORDERKEY NUMBER(12) NOT NULL, L_PARTKEY NUMBER(12) NOT NULL, L_LINENUMBER NUMBER(12) NOT NULL, L_QUANTITY NUMBER(12,2) NOT NULL, L_SHIPDATE DATE NOT NULL, CONSTRAINT LINEITEM_PKEY PRIMARY KEY (L_ORDERKEY, L_LINENUMBER), CONSTRAINT LINEITEM_FKEY1 FOREIGN KEY (L_ORDERKEY) REFERENCES ORDERS(O_ORDERKEY), CONSTRAINT LINEITEM_FKEY2 FOREIGN KEY (L_PARTKEY) REFERENCES PART(P_PARTKEY) ); Assume that, the relational tables listed above occupy the following amounts of disk storage: CUSTOMER 100 Mbytes PART 400 Mbytes PARTSUPP 600 Mbytes ORDERS 700 Mbytes LINEITEM 900 Mbytes

3 Question 1 (5 marks) Consider a fragment of simple JDBC application listed below. The application connects to a sample database described on Introduction page of the test paper. Rewrite the application such that the new version of executes faster than the original one. Try to speed up the application as much as you can. Assume that the order in which the output lines are printed can be different from an order produced by the original application. Write the comprehensive explanations why the improved application is more efficient than the original one. Statement stmt1 = conn.createstatement (); Statement stmt2 = conn.createstatement(); long total = 0; long part_key1; ResultSet rset1 = stmt1.executequery( " SELECT P_PARTKEY " + " FROM PART " ); while ( rset1.next() ) { part_key1 = rset1.getint(1); ResultSet rset2 = stmt2.executequery( " SELECT L_PARTKEY " + " FROM LINEITEM " + " WHERE L_ORDERKEY < 1000 " ); long part_key2; while ( rset2.next() ) { part_key2 = rset2.getint(1); if (part_key1 == part_key2) total++; } } System.out.println( total );

4 (continued)

5 Question 2 (3 marks) Consider SELECT statement listed below. The relational tables used in the statement are listed on Introduction page of the test paper. SELECT C_NAME, COUNT(*) FROM CUSTOMER JOIN ORDERS ON C_CUSTKEY = O_CUSTKEY WHERE TO_CHAR(O_DATE, 'YYYY') = '2015' GROUP BY C_CUSTKEY, C_NAME HAVING COUNT(*) = (SELECT MAX(COUNT(*)) FROM CUSTOMER WHERE C_CUSTKEY IN (SELECT O_CUSTKEY FROM ORDERS WHERE TO_CHAR(O_DATE, 'YYYY') = '2015') GROUP BY C_CUSTKEY, C_NAME); Use WITH clause to rewrite the statement into a more compact form that can be optimized by a query processor in a better way than the original statement. Explain why your statement with WITH clause can be optimized by a query processor.

6 Question 3 (4 marks) Transform SELECT statement given below into a syntax tree of an equivalent relational algebra expression and optimize the syntax tree by "pushing" selections and projections down the syntax tree. The relational tables used in the statement are listed on Introduction page of the test paper. Use the following operations of relational algebra: selection, projection, join, and antijoin. You can use the symbols of operations explained during the lecture classes. There is no need to write a relational algebra expression and there is no need to draw the intermediate stages of a syntax tree. The final optimized syntax tree is all right. There is no need to consider different implementations of join and antijoin operations. SELECT C_CUSTKEY, C_NAME FROM CUSTOMER WHERE EXISTS (SELECT O_ORDERKEY FROM ORDERS WHERE C_CUSTKEY = O_CUSTKEY AND O_ORDERKEY NOT IN (SELECT L_ORDERKEY FROM LINEITEM WHERE L_PARTKEY = 'P007') AND O_DATE > '01-JAN-2000');

7 Question 4 (4 marks) Consider a fragment of simple JDBC application listed below. The application connects to a sample database described on Introduction page of the test paper. Rewrite the application such that the new version executes faster than the original one. Try to speed up the application as much as you can. Assume, that the order in which output lines are printed can be different from an order produced by the original application. Write the comprehensive explanations why the improved application is more efficient than the original one. Statement stmt1 = conn.createstatement(); ResultSet rset1 = stmt1.executequery( "SELECT * FROM PART" ); String p_name = ""; String p_brand = ""; double p_retailprice = 0.0; while ( rset1.next() ) { p_name = rset1.getstring(2); p_brand = rset1.getstring(3); p_retailprice = rset1.getdouble(5); if (p_amount > 100) System.out.println( p_name ); else if (p_retailprice <= 901.0) System.out.println( p_name ); } System.out.println( "Done." );

8 Question 5 (4 marks) SELECT statements listed below are two implementations of same query. Parts are supplied by different suppliers (PARTSUPP table). Each supplier may have a different quantity of parts (PS_AVAILQTY) available. The query finds for each part supplied its key (PS_PARTKEY) and the largest available quantity. (1) SELECT PS_PARTKEY, MAX(PS_AVAILQTY) FROM PARTSUPP GROUP BY PS_PARTKEY; (2) SELECT PS_PARTKEY, PS_AVAILQTY FROM PARTSUPP WHERE PS_AVAILQTY >= ALL(SELECT PS_AVAILQTY FROM PARTSUPP PS WHERE PS_PARTKEY= PS.PS_PARTKEY); Explain how each one of SELECT statement will be processed. In your explanation you can propose the simple processing plans for each statement. Compare the processing plans for both statements and decide which plan is more efficient, i.e. implementation of better plan takes less read block operations and less time. Justify your decision. END OF TEST PAPER

TPC-H Benchmark Set. TPC-H Benchmark. DDL for TPC-H datasets

TPC-H Benchmark Set. TPC-H Benchmark. DDL for TPC-H datasets TPC-H Benchmark Set TPC-H Benchmark TPC-H is an ad-hoc and decision support benchmark. Some of queries are available in the current Tajo. You can download the TPC-H data generator here. DDL for TPC-H datasets

More information

Technical Report - Distributed Database Victor FERNANDES - Université de Strasbourg /2000 TECHNICAL REPORT

Technical Report - Distributed Database Victor FERNANDES - Université de Strasbourg /2000 TECHNICAL REPORT TECHNICAL REPORT Distributed Databases And Implementation of the TPC-H Benchmark Victor FERNANDES DESS Informatique Promotion : 1999 / 2000 Page 1 / 29 TABLE OF CONTENTS ABSTRACT... 3 INTRODUCTION... 3

More information

Comparison of Database Cloud Services

Comparison of Database Cloud Services Comparison of Database Cloud Services Benchmark Testing Overview ORACLE WHITE PAPER SEPTEMBER 2016 Table of Contents Table of Contents 1 Disclaimer 2 Preface 3 Introduction 4 Cloud OLTP Workload 5 Cloud

More information

On-Disk Bitmap Index Performance in Bizgres 0.9

On-Disk Bitmap Index Performance in Bizgres 0.9 On-Disk Bitmap Index Performance in Bizgres 0.9 A Greenplum Whitepaper April 2, 2006 Author: Ayush Parashar Performance Engineering Lab Table of Contents 1.0 Summary...1 2.0 Introduction...1 3.0 Performance

More information

High Volume In-Memory Data Unification

High Volume In-Memory Data Unification 25 March 2017 High Volume In-Memory Data Unification for UniConnect Platform powered by Intel Xeon Processor E7 Family Contents Executive Summary... 1 Background... 1 Test Environment...2 Dataset Sizes...

More information

When and How to Take Advantage of New Optimizer Features in MySQL 5.6. Øystein Grøvlen Senior Principal Software Engineer, MySQL Oracle

When and How to Take Advantage of New Optimizer Features in MySQL 5.6. Øystein Grøvlen Senior Principal Software Engineer, MySQL Oracle When and How to Take Advantage of New Optimizer Features in MySQL 5.6 Øystein Grøvlen Senior Principal Software Engineer, MySQL Oracle Program Agenda Improvements for disk-bound queries Subquery improvements

More information

TPC BENCHMARK TM H (Decision Support) Standard Specification Revision

TPC BENCHMARK TM H (Decision Support) Standard Specification Revision TPC BENCHMARK TM H (Decision Support) Standard Specification Revision 2.17.3 Transaction Processing Performance Council (TPC) Presidio of San Francisco Building 572B Ruger St. (surface) P.O. Box 29920

More information

TPC BENCHMARK TM H (Decision Support) Standard Specification Revision 2.8.0

TPC BENCHMARK TM H (Decision Support) Standard Specification Revision 2.8.0 TPC BENCHMARK TM H (Decision Support) Standard Specification Revision 2.8.0 Transaction Processing Performance Council (TPC) Presidio of San Francisco Building 572B Ruger St. (surface) P.O. Box 29920 (mail)

More information

Avoiding Sorting and Grouping In Processing Queries

Avoiding Sorting and Grouping In Processing Queries Avoiding Sorting and Grouping In Processing Queries Outline Motivation Simple Example Order Properties Grouping followed by ordering Order Property Optimization Performance Results Conclusion Motivation

More information

Two-Phase Optimization for Selecting Materialized Views in a Data Warehouse

Two-Phase Optimization for Selecting Materialized Views in a Data Warehouse Two-Phase Optimization for Selecting Materialized Views in a Data Warehouse Jiratta Phuboon-ob, and Raweewan Auepanwiriyakul Abstract A data warehouse (DW) is a system which has value and role for decision-making

More information

MOIRA A Goal-Oriented Incremental Machine Learning Approach to Dynamic Resource Cost Estimation in Distributed Stream Processing Systems

MOIRA A Goal-Oriented Incremental Machine Learning Approach to Dynamic Resource Cost Estimation in Distributed Stream Processing Systems MOIRA A Goal-Oriented Incremental Machine Learning Approach to Dynamic Resource Cost Estimation in Distributed Stream Processing Systems Daniele Foroni, C. Axenie, S. Bortoli, M. Al Hajj Hassan, R. Acker,

More information

Comparison of Database Cloud Services

Comparison of Database Cloud Services Comparison of Database Cloud Services Testing Overview ORACLE WHITE PAPER SEPTEMBER 2016 Table of Contents Table of Contents 1 Disclaimer 2 Preface 3 Introduction 4 Cloud OLTP Workload 5 Cloud Analytic

More information

CPI Phoenix IQ-201 using EXASolution 2.0

CPI Phoenix IQ-201 using EXASolution 2.0 TPC Benchmark TM H Full Disclosure Report CPI Phoenix IQ-201 using EXASolution 2.0 First Edition April 2, 2008 TPC-H FULL DISCLOSURE REPORT 1 First Edition April 2, 2008 CPI Phoenix IQ-201 using EXASolution

More information

Orri Erling (Program Manager, OpenLink Virtuoso), Ivan Mikhailov (Lead Developer, OpenLink Virtuoso).

Orri Erling (Program Manager, OpenLink Virtuoso), Ivan Mikhailov (Lead Developer, OpenLink Virtuoso). Orri Erling (Program Manager, OpenLink Virtuoso), Ivan Mikhailov (Lead Developer, OpenLink Virtuoso). Business Intelligence Extensions for SPARQL Orri Erling and Ivan Mikhailov OpenLink Software, 10 Burlington

More information

Materialized Views. March 26, 2018

Materialized Views. March 26, 2018 Materialized Views March 26, 2018 1 CREATE VIEW salessincelastmonth AS SELECT l.* FROM lineitem l, orders o WHERE l.orderkey = o.orderkey AND o.orderdate > DATE( 2015-03-31 ) SELECT partkey FROM salessincelastmonth

More information

Materialized Views. March 28, 2018

Materialized Views. March 28, 2018 Materialized Views March 28, 2018 1 CREATE VIEW salessincelastmonth AS SELECT l.* FROM lineitem l, orders o WHERE l.orderkey = o.orderkey AND o.orderdate > DATE( 2015-03-31 ) 2 CREATE VIEW salessincelastmonth

More information

CPI Phoenix IQ-201 using EXASolution 2.0

CPI Phoenix IQ-201 using EXASolution 2.0 TPC Benchmark TM H Full Disclosure Report CPI Phoenix IQ-201 using EXASolution 2.0 First Edition January 14, 2008 TPC-H FULL DISCLOSURE REPORT 1 First Edition January 14, 2008 CPI Phoenix IQ-201 using

More information

Correlated Sample Synopsis on Big Data

Correlated Sample Synopsis on Big Data Correlated Sample Synopsis on Big Data by David S. Wilson A thesis submitted to Youngstown State University in partial fulfillment of the requirements for the degree of Master of Science in the Computer

More information

A Nested Relational Approach to Processing SQL Subqueries

A Nested Relational Approach to Processing SQL Subqueries A Nested Relational Approach to Processing SQL Subqueries Bin Cao bin.cao@louisville.edu Antonio Badia abadia@louisville.edu Computer Engineering and Computer Science Department University of Louisville

More information

CSIT115/CSIT815 Data Management and Security Assignment 2

CSIT115/CSIT815 Data Management and Security Assignment 2 School of Computing and Information Technology Session: Autumn 2016 University of Wollongong Lecturer: Janusz R. Getta CSIT115/CSIT815 Data Management and Security Assignment 2 Scope This assignment consists

More information

TPC Benchmark H Full Disclosure Report

TPC Benchmark H Full Disclosure Report HP NetServer LXr 8500 using Microsoft Windows 2000 and Microsoft SQL Server 2000 TPC Benchmark H Full Disclosure Report Second Edition Submitted for Review August 18, 2000 First Edition - August 18, 2000

More information

TPC Benchmark H Full Disclosure Report. Sun Microsystems Sun Fire X4100 Server Using Sybase IQ 12.6 Single Application Server

TPC Benchmark H Full Disclosure Report. Sun Microsystems Sun Fire X4100 Server Using Sybase IQ 12.6 Single Application Server TPC Benchmark H Full Disclosure Report Sun Microsystems Sun Fire X4100 Server Using Sybase IQ 12.6 Single Application Server Submitted for Review Report Date: Jun 23, 2006 TPC Benchmark H Full Disclosure

More information

Challenges in Query Optimization. Doug Inkster, Ingres Corp.

Challenges in Query Optimization. Doug Inkster, Ingres Corp. Challenges in Query Optimization Doug Inkster, Ingres Corp. Abstract Some queries are inherently more difficult than others for a query optimizer to generate efficient plans. This session discusses the

More information

Histogram Support in MySQL 8.0

Histogram Support in MySQL 8.0 Histogram Support in MySQL 8.0 Øystein Grøvlen Senior Principal Software Engineer MySQL Optimizer Team, Oracle February 2018 Program Agenda 1 2 3 4 5 Motivating example Quick start guide How are histograms

More information

Developing a Dynamic Mapping to Manage Metadata Changes in Relational Sources

Developing a Dynamic Mapping to Manage Metadata Changes in Relational Sources Developing a Dynamic Mapping to Manage Metadata Changes in Relational Sources 1993-2016 Informatica LLC. No part of this document may be reproduced or transmitted in any form, by any means (electronic,

More information

Parallelism Strategies In The DB2 Optimizer

Parallelism Strategies In The DB2 Optimizer Session: A05 Parallelism Strategies In The DB2 Optimizer Calisto Zuzarte IBM Toronto Lab May 20, 2008 09:15 a.m. 10:15 a.m. Platform: DB2 on Linux, Unix and Windows The Database Partitioned Feature (DPF)

More information

Oracle. Professional. WITH Function-Based Indexes (FBIs), I was able to alter an execution. Avoid Costly Joins with FBIs Pedro Bizarro.

Oracle. Professional. WITH Function-Based Indexes (FBIs), I was able to alter an execution. Avoid Costly Joins with FBIs Pedro Bizarro. Oracle Solutions for High-End Oracle DBAs and Developers Professional Avoid Costly Joins with FBIs Pedro Bizarro In this article, Pedro Bizarro describes how to use Function-Based Indexes to avoid costly

More information

Towards Comprehensive Testing Tools

Towards Comprehensive Testing Tools Towards Comprehensive Testing Tools Redefining testing mechanisms! Kuntal Ghosh (Software Engineer) PGCon 2017 26.05.2017 1 Contents Motivation Picasso Visualizer Picasso Art Gallery for PostgreSQL 10

More information

Midterm Review. March 27, 2017

Midterm Review. March 27, 2017 Midterm Review March 27, 2017 1 Overview Relational Algebra & Query Evaluation Relational Algebra Rewrites Index Design / Selection Physical Layouts 2 Relational Algebra & Query Evaluation 3 Relational

More information

Lazy Maintenance of Materialized Views

Lazy Maintenance of Materialized Views Lazy Maintenance of Materialized Views Jingren Zhou, Microsoft Research, USA Paul Larson, Microsoft Research, USA Hicham G. Elmongui, Purdue University, USA Introduction 2 Materialized views Speed up query

More information

Optimizing Queries Using Materialized Views

Optimizing Queries Using Materialized Views Optimizing Queries Using Materialized Views Paul Larson & Jonathan Goldstein Microsoft Research 3/22/2001 Paul Larson, View matching 1 Materialized views Precomputed, stored result defined by a view expression

More information

Benchmark TPC-H 100.

Benchmark TPC-H 100. Benchmark TPC-H 100 vs Benchmark TPC-H Transaction Processing Performance Council (TPC) is a non-profit organization founded in 1988 to define transaction processing and database benchmarks and to disseminate

More information

The query processor turns user queries and data modification commands into a query plan - a sequence of operations (or algorithm) on the database

The query processor turns user queries and data modification commands into a query plan - a sequence of operations (or algorithm) on the database query processing Query Processing The query processor turns user queries and data modification commands into a query plan - a sequence of operations (or algorithm) on the database from high level queries

More information

Oracle Database 10g Java Web

Oracle Database 10g Java Web Oracle Database 10g Java Web 2005 5 Oracle Database 10g Java Web... 3... 3... 4... 4... 4 JDBC... 5... 5... 5 JDBC... 6 JDBC... 8 JDBC... 9 JDBC... 10 Java... 11... 12... 12... 13 Oracle Database EJB RMI/IIOP...

More information

6.830 Problem Set 2 (2017)

6.830 Problem Set 2 (2017) 6.830 Problem Set 2 1 Assigned: Monday, Sep 25, 2017 6.830 Problem Set 2 (2017) Due: Monday, Oct 16, 2017, 11:59 PM Submit to Gradescope: https://gradescope.com/courses/10498 The purpose of this problem

More information

Optimizing Communication for Multi- Join Query Processing in Cloud Data Warehouses

Optimizing Communication for Multi- Join Query Processing in Cloud Data Warehouses Optimizing Communication for Multi- Join Query Processing in Cloud Data Warehouses Swathi Kurunji, Tingjian Ge, Xinwen Fu, Benyuan Liu, Cindy X. Chen Computer Science Department, University of Massachusetts

More information

Designing a Persistence Framework

Designing a Persistence Framework Designing a Persistence Framework Working directly with code that uses JDBC is low-level data access; As application developers, one is more interested in the business problem that requires this data access.

More information

On-Disk Bitmap Index In Bizgres

On-Disk Bitmap Index In Bizgres On-Disk Bitmap Index In Bizgres Ayush Parashar aparashar@greenplum.com and Jie Zhang jzhang@greenplum.com 1 Agenda Introduction to On-Disk Bitmap Index Bitmap index creation Bitmap index creation performance

More information

X2S. A Major Qualifying Project Report: Submitted to the Faculty. Of the WORCESTER POLYTECHNIC INSTITUTE

X2S. A Major Qualifying Project Report: Submitted to the Faculty. Of the WORCESTER POLYTECHNIC INSTITUTE Project Number: CS-2000 X2S A Major Qualifying Project Report: Submitted to the Faculty Of the WORCESTER POLYTECHNIC INSTITUTE In partial fulfillment of the requirements for the Degree of Bachelor of Science

More information

ABSTRACT. GUPTA, SHALU View Selection for Query-Evaluation Efficiency using Materialized

ABSTRACT. GUPTA, SHALU View Selection for Query-Evaluation Efficiency using Materialized ABSTRACT GUPTA, SHALU View Selection for Query-Evaluation Efficiency using Materialized Views (Under the direction of Dr. Rada Chirkova) The purpose of this research is to show the use of derived data

More information

a linear algebra approach to olap

a linear algebra approach to olap a linear algebra approach to olap Rogério Pontes December 14, 2015 Universidade do Minho data warehouse ETL OLTP OLAP ETL Warehouse OLTP Data Mining ETL OLTP Data Marts 2 olap Online analytical processing

More information

Whitepaper. Big Data implementation: Role of Memory and SSD in Microsoft SQL Server Environment

Whitepaper. Big Data implementation: Role of Memory and SSD in Microsoft SQL Server Environment Whitepaper Big Data implementation: Role of Memory and SSD in Microsoft SQL Server Environment Scenario Analysis of Decision Support System with Microsoft Windows Server 2012 OS & SQL Server 2012 and Samsung

More information

Efficiency Analysis of the access method with the cascading Bloom filter to the data warehouse on the parallel computing platform

Efficiency Analysis of the access method with the cascading Bloom filter to the data warehouse on the parallel computing platform Journal of Physics: Conference Series PAPER OPEN ACCESS Efficiency Analysis of the access method with the cascading Bloom filter to the data warehouse on the parallel computing platform To cite this article:

More information

CSE 135. Three-Tier Architecture. Applications Utilizing Databases. Browser. App. Server. Database. Server

CSE 135. Three-Tier Architecture. Applications Utilizing Databases. Browser. App. Server. Database. Server CSE 135 Applications Utilizing Databases Three-Tier Architecture Located @ Any PC HTTP Requests Browser HTML Located @ Server 2 App Server JDBC Requests JSPs Tuples Located @ Server 1 Database Server 2

More information

Benchmarking In PostgreSQL

Benchmarking In PostgreSQL Benchmarking In PostgreSQL Lessons learned Kuntal Ghosh (Senior Software Engineer) Rafia Sabih (Software Engineer) 2017 EnterpriseDB Corporation. All rights reserved. 1 Overview Why benchmarking on PostgreSQL

More information

Database Programming. Week 9. *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford

Database Programming. Week 9. *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford Database Programming Week 9 *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford SQL in Real Programs We have seen only how SQL is used at the generic query interface

More information

Tuning Relational Systems I

Tuning Relational Systems I Tuning Relational Systems I Schema design Trade-offs among normalization, denormalization, clustering, aggregate materialization, vertical partitioning, etc Query rewriting Using indexes appropriately,

More information

Jayant Haritsa. Database Systems Lab Indian Institute of Science Bangalore, India

Jayant Haritsa. Database Systems Lab Indian Institute of Science Bangalore, India Jayant Haritsa Database Systems Lab Indian Institute of Science Bangalore, India Query Execution Plans SQL, the standard database query interface, is a declarative language Specifies only what is wanted,

More information

CSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100

CSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100 CSE 344 Midterm Wednesday, February 19, 2014, 14:30-15:20 Name: Question Points Score 1 30 2 50 3 12 4 8 Total: 100 This exam is open book and open notes but NO laptops or other portable devices. You have

More information

Multiple query optimization in middleware using query teamwork

Multiple query optimization in middleware using query teamwork SOFTWARE PRACTICE AND EXPERIENCE Softw. Pract. Exper. 2005; 35:361 391 Published online 21 December 2004 in Wiley InterScience (www.interscience.wiley.com). DOI: 10.1002/spe.640 Multiple query optimization

More information

Query Optimization Time: The New Bottleneck in Realtime

Query Optimization Time: The New Bottleneck in Realtime Query Optimization Time: The New Bottleneck in Realtime Analytics Rajkumar Sen Jack Chen Nika Jimsheleishvilli MemSQL Inc. MemSQL Inc. MemSQL Inc. 534 4 th Street, 534 4 th Street, 534 4 th Street, San

More information

Schema Tuning. Tuning Schemas : Overview

Schema Tuning. Tuning Schemas : Overview Administração e Optimização de Bases de Dados 2012/2013 Schema Tuning Bruno Martins DEI@Técnico e DMIR@INESC-ID Tuning Schemas : Overview Trade-offs among normalization / denormalization Overview When

More information

Java Database Connectivity

Java Database Connectivity Java Database Connectivity INTRODUCTION Dr. Syed Imtiyaz Hassan Assistant Professor, Deptt. of CSE, Jamia Hamdard (Deemed to be University), New Delhi, India. s.imtiyaz@jamiahamdard.ac.in Agenda Introduction

More information

SQL and Incomp?ete Data

SQL and Incomp?ete Data SQL and Incomp?ete Data A not so happy marriage Dr Paolo Guagliardo Applied Databases, Guest Lecture 31 March 2016 SQL is efficient, correct and reliable 1 / 25 SQL is efficient, correct and reliable...

More information

TPC Benchmark H Full Disclosure Report. Sun Microsystems Sun Fire V490 Server Using Sybase IQ 12.6 Single Application Server

TPC Benchmark H Full Disclosure Report. Sun Microsystems Sun Fire V490 Server Using Sybase IQ 12.6 Single Application Server TPC Benchmark H Full Disclosure Report Sun Microsystems Sun Fire V490 Server Using Sybase IQ 12.6 Single Application Server Submitted for Review Report Date: Jan 5, 2006 TPC Benchmark H Full Disclosure

More information

TPC Benchmark H Full Disclosure Report. Sun Microsystems Sun Fire X4200 M2 Server Using Sybase IQ 12.6 Single Application Server

TPC Benchmark H Full Disclosure Report. Sun Microsystems Sun Fire X4200 M2 Server Using Sybase IQ 12.6 Single Application Server TPC Benchmark H Full Disclosure Report Sun Microsystems Sun Fire X4200 M2 Server Using Sybase IQ 12.6 Single Application Server Submitted for Review Report Date: May 25, 2007 TPC Benchmark H Full Disclosure

More information

AutoJoin: Providing Freedom from Specifying Joins

AutoJoin: Providing Freedom from Specifying Joins AutoJoin: Providing Freedom from Specifying Joins Terrence Mason Iowa Database and Emerging Applications Laboratory, Computer Science University of Iowa Email: terrence-mason, lixin-wang, ramon-lawrence@uiowa.uiowa.edu

More information

Teaching Relational Optimizers About XML Processing

Teaching Relational Optimizers About XML Processing Teaching Relational Optimizers About XML Processing Sihem Amer-Yahia, Yannis Kotidis, and Divesh Srivastava AT&T Labs-Research, Florham Park NJ 07932, USA, {sihem,kotidis,divesh}@research.att.com Abstract.

More information

Efficient in-memory query execution using JIT compiling. Han-Gyu Park

Efficient in-memory query execution using JIT compiling. Han-Gyu Park Efficient in-memory query execution using JIT compiling Han-Gyu Park 2012-11-16 CONTENTS Introduction How DCX works Experiment(purpose(at the beginning of this slide), environment, result, analysis & conclusion)

More information

Optimizer Standof. MySQL 5.6 vs MariaDB 5.5. Peter Zaitsev, Ovais Tariq Percona Inc April 18, 2012

Optimizer Standof. MySQL 5.6 vs MariaDB 5.5. Peter Zaitsev, Ovais Tariq Percona Inc April 18, 2012 Optimizer Standof MySQL 5.6 vs MariaDB 5.5 Peter Zaitsev, Ovais Tariq Percona Inc April 18, 2012 Thank you Ovais Tariq Ovais Did a lot of heavy lifing for this presentation He could not come to talk together

More information

Introduction to SQL & Database Application Development Using Java

Introduction to SQL & Database Application Development Using Java Introduction to SQL & Database Application Development Using Java By Alan Andrea The purpose of this paper is to give an introduction to relational database design and sql with a follow up on how these

More information

Anorexic Plan Diagrams

Anorexic Plan Diagrams Anorexic Plan Diagrams E0 261 Jayant Haritsa Computer Science and Automation Indian Institute of Science JAN 2014 Plan Diagram Reduction 1 Query Plan Selection Core technique Query (Q) Query Optimizer

More information

1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)

1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50) Student number: Signature: UNIVERSITY OF VICTORIA Faculty of Engineering Department of Computer Science CSC 370 (Database Systems) Instructor: Daniel M. German Midterm Oct 21, 2004 Duration: 60 minutes

More information

Answer any four from (a) to (g) questions : (4 x 2=8)

Answer any four from (a) to (g) questions : (4 x 2=8) SAMPLE PAPER Class XI Annual Examination 2014-15 Subject - Informatics Practices Max. Marks : 70 Time : 3 Hrs. Note : Read the instructions carefully before answering Q.1 Answer the following questions

More information

Benchmarking Polystores: the CloudMdsQL Experience

Benchmarking Polystores: the CloudMdsQL Experience Benchmarking Polystores: the CloudMdsQL Experience Boyan Kolev, Raquel Pau, Oleksandra Levchenko, Patrick Valduriez, Ricardo Jiménez-Peris, José Pereira To cite this version: Boyan Kolev, Raquel Pau, Oleksandra

More information

Beyond EXPLAIN. Query Optimization From Theory To Code. Yuto Hayamizu Ryoji Kawamichi. 2016/5/20 PGCon Ottawa

Beyond EXPLAIN. Query Optimization From Theory To Code. Yuto Hayamizu Ryoji Kawamichi. 2016/5/20 PGCon Ottawa Beyond EXPLAIN Query Optimization From Theory To Code Yuto Hayamizu Ryoji Kawamichi 2016/5/20 PGCon 2016 @ Ottawa Historically Before Relational Querying was physical Need to understand physical organization

More information

A Compression Framework for Query Results

A Compression Framework for Query Results A Compression Framework for Query Results Zhiyuan Chen and Praveen Seshadri Cornell University zhychen, praveen@cs.cornell.edu, contact: (607)255-1045, fax:(607)255-4428 Decision-support applications in

More information

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1 MySQL : 5.6 the Next Generation Lynn Ferrante Principal Consultant, Technical Sales Engineering Northern California Oracle Users Group November 2012 2 Safe Harbor Statement The

More information

XWeB: the XML Warehouse Benchmark

XWeB: the XML Warehouse Benchmark XWeB: the XML Warehouse Benchmark CEMAGREF Clermont-Ferrand -- Université de Lyon (ERIC Lyon 2) hadj.mahboubi@cemagref.fr -- jerome.darmont@univ-lyon2.fr September 17, 2010 XWeB: CEMAGREF the XML Warehouse

More information

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment Introductory concepts of DBMS 1. Explain detailed 3-level architecture

More information

Final Exam. COMP Summer I June 26, points

Final Exam. COMP Summer I June 26, points Final Exam COMP 14-090 Summer I 2000 June 26, 2000 200 points 1. Closed book and closed notes. No outside material allowed. 2. Write all answers on the test itself. Do not write any answers in a blue book

More information

CS 474, Spring 2016 Midterm Exam #2

CS 474, Spring 2016 Midterm Exam #2 CS 474, Spring 2016 Midterm Exam #2 Name: e-id: @dukes.jmu.edu By writing your name, you acknowledge the following honor code statement: I have neither given nor received unauthorized assistance on this

More information

CS40 Exam #2 November 14, 2001

CS40 Exam #2 November 14, 2001 CS40 Exam #2 November 14, 2001 Name: Except where explicitly noted, all of the questions on this exam refer to the database defined by the relational schemas given on the last page of this exam. 1. Suppose

More information

CIS 550, Database and Information Systems Homework 5 (Due by 11:59:59 on April 14)

CIS 550, Database and Information Systems Homework 5 (Due by 11:59:59 on April 14) CIS 550, Database and Information Systems Homework 5 (Due by 11:59:59 on April 14) Problem 1: Relational Algebra [25 points] Recall from HW1 the following partial schema for the (real) Internet Movie Database

More information

SMOPD-C: An Autonomous Vertical Partitioning Technique for Distributed Databases on Cluster Computers

SMOPD-C: An Autonomous Vertical Partitioning Technique for Distributed Databases on Cluster Computers SMOPD-C: An Autonomous Vertical Partitioning Technique for Distributed Databases on Cluster Computers Liangzhe Li School of Computer Science University of Oklahoma Norman, USA lzli@ou.edu Le Gruenwald

More information

vsql: Verifying Arbitrary SQL Queries over Dynamic Outsourced Databases

vsql: Verifying Arbitrary SQL Queries over Dynamic Outsourced Databases vsql: Verifying Arbitrary SQL Queries over Dynamic Outsourced Databases Yupeng Zhang, Daniel Genkin, Jonathan Katz, Dimitrios Papadopoulos and Charalampos Papamanthou Verifiable Databases client SQL database

More information

Basic operators: selection, projection, cross product, union, difference,

Basic operators: selection, projection, cross product, union, difference, CS145 Lecture Notes #6 Relational Algebra Steps in Building and Using a Database 1. Design schema 2. Create schema in DBMS 3. Load initial data 4. Repeat: execute queries and updates on the database Database

More information

How to program applications. CS 2550 / Spring 2006 Principles of Database Systems. SQL is not enough. Roadmap

How to program applications. CS 2550 / Spring 2006 Principles of Database Systems. SQL is not enough. Roadmap How to program applications CS 2550 / Spring 2006 Principles of Database Systems 05 SQL Programming Using existing languages: Embed SQL into Host language ESQL, SQLJ Use a library of functions Design a

More information

Enhanced XML Support in DB2 for LUW

Enhanced XML Support in DB2 for LUW extra on Demand Enhanced XML Support in DB2 for LUW Speaker Name David Owen (DOCE) Session: H12 Thursday May 26 th 2005 8:30am 1 Agenda XML support in the DB2 Family XML extender for decomposing XML documents

More information

General Overview - rel. model. Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Reminder: our Mini-U db

General Overview - rel. model. Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Reminder: our Mini-U db Faloutsos 15-415 Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications Lecture#8 (cont d): SQL, Part 2 General Overview - rel. model Formal query languages rel algebra and calculi

More information

TPC Benchmark H Full Disclosure Report. Kickfire Appliance 2400 Using MySQL Database

TPC Benchmark H Full Disclosure Report. Kickfire Appliance 2400 Using MySQL Database TPC Benchmark H Full Disclosure Report Kickfire Appliance 2400 Using MySQL Database Submitted for Review Report Date: May 5, 2008 TPCH Benchmark Full Disclosure Report Added discount explanation note (June

More information

CSE414 Midterm Exam Spring 2018

CSE414 Midterm Exam Spring 2018 CSE414 Midterm Exam Spring 2018 May 4, 2018 Please read all instructions (including these) carefully. This is a closed-book exam. You are allowed one page of note sheets that you can write on both sides.

More information

GPU-Accelerated Analytics on your Data Lake.

GPU-Accelerated Analytics on your Data Lake. GPU-Accelerated Analytics on your Data Lake. Data Lake Data Swamp ETL Hell DATA LAKE 0001010100001001011010110 >>>>>>>>>>>>>>>>>>>>>> >>>>>>>> >>>>>> >>>>>>>>>>>>>>>>> >>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>>>>

More information

Fighting Redundancy in SQL

Fighting Redundancy in SQL Fighting Redundancy in SQL Antonio Badia and Dev Anand Computer Engineering and Computer Science department University of Louisville, Louisville KY 40292 Abstract. Many SQL queries with aggregated subqueries

More information

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2017 EXAMINATIONS CSC 104 H1S Instructor(s): G. Baumgartner Duration 3 hours PLEASE HAND IN No Aids Allowed Student Number: Last (Family)

More information

Real-World Performance Training Star Query Prescription

Real-World Performance Training Star Query Prescription Real-World Performance Training Star Query Prescription Real-World Performance Team Dimensional Queries 1 2 3 4 The Dimensional Model and Star Queries Star Query Execution Star Query Prescription Edge

More information

Bachelor in Information Technology (BIT) O Term-End Examination

Bachelor in Information Technology (BIT) O Term-End Examination No. of Printed Pages : 6 I CSI-14 I Bachelor in Information Technology (BIT) O Term-End Examination cn Cn1 June, 2010 CD cp CSI-14 : DATA ANALYSIS AND DATABASE DESIGN Time : 3 hours Maximum Marks : 75

More information

Birkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6)

Birkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6) Birkbeck (University of London) BSc/FD EXAMINATION Department of Computer Science and Information Systems Database Management (COIY028H6) CREDIT VALUE: 15 credits Date of examination: Monday 9th June 2014

More information

Laboratory Manual. For. Database Management System (IT 502) B.Tech (IT) SEM V. June 2010

Laboratory Manual. For. Database Management System (IT 502) B.Tech (IT) SEM V. June 2010 Laboratory Manual For Database Management System (IT 502) B.Tech (IT) SEM V June 2010 Faculty of Technology Dharmsinh Desai University Nadiad. www.ddu.ac.in EXPERIMENT-1 Table of Contents Introduction

More information

Robust Optimization of Database Queries

Robust Optimization of Database Queries Robust Optimization of Database Queries Jayant Haritsa Database Systems Lab Indian Institute of Science July 2011 Robust Query Optimization (IASc Mid-year Meeting) 1 Database Management Systems (DBMS)

More information

Practice questions recommended before the final examination

Practice questions recommended before the final examination CSCI235 Database Systems, Spring 2017 Practice questions recommended before the final examination Conceptual modelling Task 1 Read the following specification of a sample database domain. A construction

More information

Query processing for parallel languages. Brandon Myers, Mark Oskin, Bill Howe DB Day 2015

Query processing for parallel languages. Brandon Myers, Mark Oskin, Bill Howe DB Day 2015 Query processing for parallel languages Brandon Myers, Mark Oskin, Bill Howe bdmyers@cs.washington.edu DB Day 2015 1 slide src: Jeff Gardner 2 How to turn astrophysics simulation output into scientific

More information

COP4540 TUTORIAL PROFESSOR: DR SHU-CHING CHEN TA: H S IN-YU HA

COP4540 TUTORIAL PROFESSOR: DR SHU-CHING CHEN TA: H S IN-YU HA COP4540 TUTORIAL PROFESSOR: DR SHU-CHING CHEN TA: H S IN-YU HA OUTLINE Postgresql installation Introduction of JDBC Stored Procedure POSTGRES INSTALLATION (1) Extract the source file Start the configuration

More information

Midterm Review. Winter Lecture 13

Midterm Review. Winter Lecture 13 Midterm Review Winter 2006-2007 Lecture 13 Midterm Overview 3 hours, single sitting Topics: Relational model relations, keys, relational algebra expressions SQL DDL commands CREATE TABLE, CREATE VIEW Specifying

More information

Three-Tier Architecture

Three-Tier Architecture Three-Tier Architecture Located @ Any PC HTTP Requests Microsoft Internet Explorer HTML Located @ Your PC Apache Tomcat App Server Java Server Pages (JSPs) JDBC Requests Tuples Located @ DBLab MS SQL Server

More information

INDIAN SCHOOL SOHAR FIRST TERM EXAM ( ) INFORMATICS PRACTICES

INDIAN SCHOOL SOHAR FIRST TERM EXAM ( ) INFORMATICS PRACTICES INDIAN SCHOOL SOHAR FIRST TERM EXAM (2015-2016) INFORMATICS PRACTICES Page 1 of 5 No. of printed pages: 5 Class: XI Marks: 70 Date: 10-09-15 Time: 3 hours Instructions: a. All the questions are compulsory.

More information

SQL-Nested Queries & Aggregate functions. Lecture By Binu Jasim 02-Aug-2016

SQL-Nested Queries & Aggregate functions. Lecture By Binu Jasim 02-Aug-2016 SQL-Nested Queries & Aggregate functions Lecture By Binu Jasim 02-Aug-2016 Student rollno name dept CGPA 123 Alice CSE 8.2 201 Bob EEE 5.6 399 Cherry CSE 8.2 Course rollno cname dept marks 123 DBMS CSE

More information

CSE 131 Introduction to Computer Science Fall Exam I

CSE 131 Introduction to Computer Science Fall Exam I CSE 131 Introduction to Computer Science Fall 2015 Given: 24 September 2015 Exam I Due: End of session This exam is closed-book, closed-notes, no electronic devices allowed. The exception is the sage page

More information

5 Years Integrated M.Sc.(IT) Semester 1 Practical LIST CC2 Database Management Systems

5 Years Integrated M.Sc.(IT) Semester 1 Practical LIST CC2 Database Management Systems 5 Years Integrated M.Sc.(IT) Semester 1 Practical LIST 060010110 CC2 Database Management Systems Practical No: 1 Duration for completion PEO(s) to be PO(s) to be CO(s) to be Date Group Analyze : Athe scenario

More information

Part I: Stored Procedures. Introduction to SQL Programming Techniques. CSC 375, Fall 2017

Part I: Stored Procedures. Introduction to SQL Programming Techniques. CSC 375, Fall 2017 Introduction to SQL Programming Techniques CSC 375, Fall 2017 The Six Phases of a Project: Enthusiasm Disillusionment Panic Search for the Guilty Punishment of the Innocent Praise for non-participants

More information