Materialized Views. March 28, 2018

Size: px
Start display at page:

Download "Materialized Views. March 28, 2018"

Transcription

1 Materialized Views March 28,

2 CREATE VIEW salessincelastmonth AS SELECT l.* FROM lineitem l, orders o WHERE l.orderkey = o.orderkey AND o.orderdate > DATE( ) 2

3 CREATE VIEW salessincelastmonth AS SELECT l.* FROM lineitem l, orders o WHERE l.orderkey = o.orderkey AND o.orderdate > DATE( ) SELECT partkey FROM salessincelastmonth ORDER BY shipdate DESC LIMIT 10; 2

4 CREATE VIEW salessincelastmonth AS SELECT l.* FROM lineitem l, orders o WHERE l.orderkey = o.orderkey AND o.orderdate > DATE( ) SELECT partkey FROM salessincelastmonth ORDER BY shipdate DESC LIMIT 10; SELECT suppkey, COUNT(*) FROM salessincelastmonth GROUP BY suppkey; 2

5 CREATE VIEW salessincelastmonth AS SELECT l.* FROM lineitem l, orders o WHERE l.orderkey = o.orderkey AND o.orderdate > DATE( ) SELECT partkey FROM salessincelastmonth ORDER BY shipdate DESC LIMIT 10; SELECT suppkey, COUNT(*) FROM salessincelastmonth GROUP BY suppkey; SELECT partkey, COUNT(*) FROM salessincelastmonth GROUP BY partkey; 2

6 Materialization Views exist to be queried frequently Pre-compute and save the view s contents! (like an index) 3

7 Materialized Views 4

8 Materialized Views Q( ) 4

9 Materialized Views Q( ) 4

10 Materialized Views Q( ) When the base data changes, the view needs to be updated 4

11 View Maintenance VIEW Q(D) 5

12 View Maintenance WHEN D D+ΔD DO: VIEW Q(D+ΔD) 6

13 View Maintenance WHEN D D+ΔD DO: VIEW Q(D+ΔD) Re-evaluating the query from scratch is expensive! 6

14 View Maintenance WHEN D D+ΔD DO: VIEW VIEW+ΔQ(D,ΔD) 7

15 View Maintenance (ideally) Smaller & Faster Query WHEN D D+ΔD DO: VIEW VIEW+ΔQ(D,ΔD) 7

16 View Maintenance (ideally) Smaller & Faster Query WHEN D D+ΔD DO: VIEW VIEW+ΔQ(D,ΔD) (ideally) Fast merge operation. 7

17 Intuition D = {1, 2, 3, 4} ΔD = {5} Q(D) = SUM(D) 8

18 Intuition D = {1, 2, 3, 4} ΔD = {5} Q(D) = SUM(D) Q(D+ΔD) ~ O( D + ΔD ) 8

19 Intuition D = {1, 2, 3, 4} ΔD = {5} Q(D) = SUM(D) Q(D+ΔD) ~ O( D + ΔD ) VIEW + SUM(ΔD) ~ O( ΔD ) 8

20 Intuition R = {1, 2, 3}, S ={5,6} ΔR = {4} Q(R,S) = COUNT(R x S) 9

21 Intuition R = {1, 2, 3}, S ={5,6} ΔR = {4} Q(R,S) = COUNT(R x S) Q(R+ΔR,S) ~ O( ( R + ΔR ) * S ) 9

22 Intuition R = {1, 2, 3}, S ={5,6} ΔR = {4} Q(R,S) = COUNT(R x S) Q(R+ΔR,S) ~ O( ( R + ΔR ) * S ) VIEW + COUNT( ΔR * S ) ~ O( ΔR * S ) 9

23 Incremental View Maintenance WHEN D D+ΔD DO: VIEW VIEW+ΔQ(D,ΔD) 10

24 Incremental View Maintenance WHEN D D+ΔD DO: VIEW VIEW+ΔQ(D,ΔD) Basic Challenges of IVM What does ΔR represent? 10

25 Incremental View Maintenance WHEN D D+ΔD DO: VIEW VIEW+ΔQ(D,ΔD) Basic Challenges of IVM What does ΔR represent? How to interpret R + ΔR? 10

26 Incremental View Maintenance WHEN D D+ΔD DO: VIEW VIEW+ΔQ(D,ΔD) Basic Challenges of IVM What does ΔR represent? How to interpret R + ΔR? How to compute ΔQ? 10

27 What is ΔR? 11

28 What is ΔR? What does it need to represent? 11

29 What is ΔR? What does it need to represent? Insertions Deletions Updates 11

30 What is ΔR? What does it need to represent? Insertions Deletions Updates (Delete Old Record & Insert Updated Record) 11

31 What is ΔR? 12

32 What is ΔR? A Set/Bag of Insertions A Set/Bag of Deletions 12

33 What is +? R A Set/Bag ΔR A Set/Bag of Insertions A Set/Bag of Deletions 13

34 What is +? R A Set/Bag + + ΔR A Set/Bag of Insertions A Set/Bag of Deletions 13

35 What is +? R A Set/Bag + + ΔR A Set/Bag of Insertions A Set/Bag of Deletions R ΔRinserted - ΔRdeleted 13

36 What is +? R A Set/Bag + + ΔR A Set/Bag of Insertions A Set/Bag of Deletions R ΔRinserted - ΔRdeleted But this breaks closure of +! 13

37 Incremental View Maintenance VIEW VIEW+ΔQ(D,ΔD) 14

38 Incremental View Maintenance VIEW VIEW+ΔQ(D,ΔD) 14

39 Incremental View Maintenance VIEW VIEW+ΔQ(D,ΔD) Given Q(R,S, ) Construct ΔQ(R,ΔR,S,ΔS, ) 14

40 Delta Queries σ R 15

41 Delta Queries σ R R ΔR Original R Inserted Tuples of R 15

42 Delta Queries σ σ R R ΔR Original R Inserted Tuples of R 15

43 Delta Queries σ σ R R ΔR Original R Inserted Tuples of R 15

44 Delta Queries σ σ R R ΔR Original R Inserted Does this work for deleted tuples? 15 Tuples of R

45 Delta Queries π π R R ΔR 16

46 Delta Queries π π R R ΔR Does this work (completely) under set semantics? 16

47 Delta Queries U R1 R2 R1 ΔR1 R2 ΔR2 17

48 Delta Queries U R1 R2 R1 ΔR1 R2 ΔR2 17

49 Delta Queries U R1 R2 R1 ΔR1 R2 ΔR2 17

50 Delta Queries x R S R ΔR S 18

51 Delta Queries R : { 1, 2, 3 } S : { 5, 6} 19

52 Delta Queries R : { 1, 2, 3 } S : { 5, 6} R x S = { <1,5>, <1, 6>, <2,5>, <2,6>, <3,5>, <3,6> } 19

53 Delta Queries R : { 1, 2, 3 } S : { 5, 6} R x S = { <1,5>, <1, 6>, <2,5>, <2,6>, <3,5>, <3,6> } ΔRinserted = { 4 } ΔRdeleted = { 3,2 } 19

54 Delta Queries R : { 1, 2, 3 } S : { 5, 6} R x S = { <1,5>, <1, 6>, <2,5>, <2,6>, <3,5>, <3,6> } ΔRinserted = { 4 } ΔRdeleted = { 3,2 } (R+ΔR) x S = { <1,5>, <1, 6>, <4,5>, <4,6> } 19

55 Delta Queries R : { 1, 2, 3 } S : { 5, 6} R x S = { <1,5>, <1, 6>, <2,5>, <2,6>, <3,5>, <3,6> } ΔRinserted = { 4 } ΔRdeleted = { 3,2 } (R+ΔR) x S = { <1,5>, <1, 6>, <4,5>, <4,6> } Δinserted(R x S) = ΔRinserted x S Δdeleted(R x S) = ΔRdeleted x S 19

56 Delta Queries R : { 1, 2, 3 } S : { 5, 6} R x S = { <1,5>, <1, 6>, <2,5>, <2,6>, <3,5>, <3,6> } ΔRinserted = { 4 } ΔRdeleted = { 3,2 } (R+ΔR) x S = { <1,5>, <1, 6>, <4,5>, <4,6> } Δinserted(R x S) = ΔRinserted x S Δdeleted(R x S) = ΔRdeleted x S What if R and S both change? 19

57 Delta Queries Computing a Delta Query 20

58 Delta Queries 21

59 Delta Queries 21

60 Delta Queries The original query 21

61 Delta Queries The original query The delta query 21

62 How about an example 22

63 Delta Queries LINEITEM CUSTOMER ORDERS Let s say you have an insertion into LINEITEM 23

64 Delta Queries LINEITEM CUSTOMER ORDERS 24

65 Delta Queries LINEITEM CUSTOMER ORDERS 25

66 Delta Queries LINEITEM CUSTOMER ORDERS = ø 25

67 Delta Queries LINEITEM CUSTOMER ORDERS 26

68 Delta Queries LINEITEM CUSTOMER ORDERS 27

69 Delta Queries SELECT * FROM CUSTOMER C, ORDERS O, DELTA_LINEITEM DL WHERE C.custkey = O.custkey AND DL.orderkey = O.orderkey AND C.mktsegment = AND O.orderdate = AND DL.shipdate = 28

70 Multisets { 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5 } (not compact) { 1 x3, 2 x5, 3 x2, 4 x6, 5 x1 } Multiset representation: Tuple # of occurrences 29

71 Multisets { 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5 } (not compact) { 1 x3, 2 x5, 3 x2, 4 x6, 5 x1 } Multiset representation: Tuple # of occurrences multiplicity 29

72 Multiset Deltas Insertions = Positive Multiplicity Deletions = Negative Multiplicity + = Bag/Multiset Union 30

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

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

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

Stream Joins and Dynamic Query Evaluation. WANG, Qichen HUANG, Ziyue

Stream Joins and Dynamic Query Evaluation. WANG, Qichen HUANG, Ziyue Stream Joins and Dynamic Query Evaluation WANG, Qichen HUANG, Ziyue Contents 1. Introduction 2. Dynamic Yannakakis Algorithm 3. Higher Order Incremental View Maintenance Problem Definition Input: Some

More information

Final Review. May 9, 2018 May 11, 2018

Final Review. May 9, 2018 May 11, 2018 Final Review May 9, 2018 May 11, 2018 1 SQL 2 A Basic SQL Query (optional) keyword indicating that the answer should not contain duplicates SELECT [DISTINCT] target-list A list of attributes of relations

More information

Virtual views. Incremental View Maintenance. View maintenance. Materialized views. Review of bag algebra. Bag algebra operators (slide 1)

Virtual views. Incremental View Maintenance. View maintenance. Materialized views. Review of bag algebra. Bag algebra operators (slide 1) Virtual views Incremental View Maintenance CPS 296.1 Topics in Database Systems A view is defined by a query over base tables Example: CREATE VIEW V AS SELECT FROM R, S WHERE ; A view can be queried just

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

Final Review. May 9, 2017

Final Review. May 9, 2017 Final Review May 9, 2017 1 SQL 2 A Basic SQL Query (optional) keyword indicating that the answer should not contain duplicates SELECT [DISTINCT] target-list A list of attributes of relations in relation-list

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

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

CSC317/MCS9317. Database Performance Tuning. Class test

CSC317/MCS9317. Database Performance Tuning. Class test 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

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

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

Master Thesis Presentation

Master Thesis Presentation Master Thesis Presentation ebiss Summer School 2017 Active Business Intelligence Compact and Efficient Query Processing under Updates Presenter: Muhammad Idris Advisors: Prof. Stijn Vansummeren Prof. Wolfgang

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

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

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

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

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

Database Usage (and Construction)

Database Usage (and Construction) Lecture 7 Database Usage (and Construction) More SQL Queries and Relational Algebra Previously Capacity per campus? name capacity campus HB2 186 Johanneberg HC1 105 Johanneberg HC2 115 Johanneberg Jupiter44

More information

The Extended Algebra. Duplicate Elimination. Sorting. Example: Duplicate Elimination

The Extended Algebra. Duplicate Elimination. Sorting. Example: Duplicate Elimination The Extended Algebra Duplicate Elimination 2 δ = eliminate duplicates from bags. τ = sort tuples. γ = grouping and aggregation. Outerjoin : avoids dangling tuples = tuples that do not join with anything.

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

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

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

arxiv: v1 [cs.db] 22 Sep 2014

arxiv: v1 [cs.db] 22 Sep 2014 Enabling Incremental Query Re-Optimization Mengmeng Liu University of Pennsylvania 333 Walnut Street Philadelphia, PA 1914 mengmeng@cis.upenn.edu Zachary G. Ives University of Pennsylvania 333 Walnut Street

More information

Databases Relational algebra Lectures for mathematics students

Databases Relational algebra Lectures for mathematics students Databases Relational algebra Lectures for mathematics students March 5, 2017 Relational algebra Theoretical model for describing the semantics of relational databases, proposed by T. Codd (who authored

More information

GPU ACCELERATION FOR OLAP. Tim Kaldewey, Jiri Kraus, Nikolay Sakharnykh 03/26/2018

GPU ACCELERATION FOR OLAP. Tim Kaldewey, Jiri Kraus, Nikolay Sakharnykh 03/26/2018 GPU ACCELERATION FOR OLAP Tim Kaldewey, Jiri Kraus, Nikolay Sakharnykh 03/26/2018 A TYPICAL ANALYTICS QUERY From a business question to SQL Business question (TPC-H query 4) Determines how well the order

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

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

Advanced Query Optimization

Advanced Query Optimization Advanced Query Optimization Andreas Meister Otto-von-Guericke University Magdeburg Summer Term 2018 Why do we need query optimization? Andreas Meister Advanced Query Optimization Last Change: April 23,

More information

SQL. Lecture 4 SQL. Basic Structure. The select Clause. The select Clause (Cont.) The select Clause (Cont.) Basic Structure.

SQL. Lecture 4 SQL. Basic Structure. The select Clause. The select Clause (Cont.) The select Clause (Cont.) Basic Structure. SL Lecture 4 SL Chapter 4 (Sections 4.1, 4.2, 4.3, 4.4, 4.5, 4., 4.8, 4.9, 4.11) Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries Derived Relations Modification of the Database

More information

How to Win a Hot Dog Eating Contest: Incremental View Maintenance with Batch Updates

How to Win a Hot Dog Eating Contest: Incremental View Maintenance with Batch Updates How to Win a Hot Dog Eating Contest: Incremental View Maintenance with Batch Updates Milos Nikolic, Mohammad Dashti, Christoph Koch DATA lab, EPFL SIGMOD, 28 th June 2016 REALTIME APPLICATIONS Web Analytics

More information

Fast and Simple Relational Processing of Uncertain Data

Fast and Simple Relational Processing of Uncertain Data Fast and Simple Relational Processing of Uncertain Data Lyublena Antova, Thomas Jansen, Christoph Koch, and Dan Olteanu Saarland University Database Group Saarbrücken, Germany {lublena, jansen, koch, olteanu}@infosys.uni-sb.de

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

Lecture Query evaluation. Combining operators. Logical query optimization. By Marina Barsky Winter 2016, University of Toronto

Lecture Query evaluation. Combining operators. Logical query optimization. By Marina Barsky Winter 2016, University of Toronto Lecture 02.03. Query evaluation Combining operators. Logical query optimization By Marina Barsky Winter 2016, University of Toronto Quick recap: Relational Algebra Operators Core operators: Selection σ

More information

How Achaeans Would Construct Columns in Troy. Alekh Jindal, Felix Martin Schuhknecht, Jens Dittrich, Karen Khachatryan, Alexander Bunte

How Achaeans Would Construct Columns in Troy. Alekh Jindal, Felix Martin Schuhknecht, Jens Dittrich, Karen Khachatryan, Alexander Bunte How Achaeans Would Construct Columns in Troy Alekh Jindal, Felix Martin Schuhknecht, Jens Dittrich, Karen Khachatryan, Alexander Bunte Number of Visas Received 1 0,75 0,5 0,25 0 Alekh Jens Health Level

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

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

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

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

Query Optimization Overview

Query Optimization Overview Query Optimization Overview parsing, syntax checking semantic checking check existence of referenced relations and attributes disambiguation of overloaded operators check user authorization query rewrites

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

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

Relational Model, Relational Algebra, and SQL

Relational Model, Relational Algebra, and SQL Relational Model, Relational Algebra, and SQL August 29, 2007 1 Relational Model Data model. constraints. Set of conceptual tools for describing of data, data semantics, data relationships, and data integrity

More information

Database System Concepts, 5th Ed.! Silberschatz, Korth and Sudarshan See for conditions on re-use "

Database System Concepts, 5th Ed.! Silberschatz, Korth and Sudarshan See   for conditions on re-use Database System Concepts, 5th Ed.! Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use " Data Definition! Basic Query Structure! Set Operations! Aggregate Functions! Null Values!

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

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

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques 376a. Database Design Dept. of Computer Science Vassar College http://www.cs.vassar.edu/~cs376 Class 16 Query optimization What happens Database is given a query Query is scanned - scanner creates a list

More information

Toward a Progress Indicator for Database Queries

Toward a Progress Indicator for Database Queries Toward a Progress Indicator for Database Queries Gang Luo Jeffrey F. Naughton Curt J. Ellmann Michael W. Watzke University of Wisconsin-Madison NCR Advance Development Lab {gangluo, naughton}@cs.wisc.edu

More information

3. Relational Data Model 3.5 The Tuple Relational Calculus

3. Relational Data Model 3.5 The Tuple Relational Calculus 3. Relational Data Model 3.5 The Tuple Relational Calculus forall quantification Syntax: t R(P(t)) semantics: for all tuples t in relation R, P(t) has to be fulfilled example query: Determine all students

More information

CLoud computing is a service through which a

CLoud computing is a service through which a 1 MAP-JOIN-REDUCE: Towards Scalable and Efficient Data Analysis on Large Clusters Dawei Jiang, Anthony K. H. TUNG, and Gang Chen Abstract Data analysis is an important functionality in cloud computing

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

DBToaster: Higher-order Delta Processing for Dynamic, Frequently Fresh Views

DBToaster: Higher-order Delta Processing for Dynamic, Frequently Fresh Views The VLDB Journal manuscript No. will be inserted by the editor) DBToaster: Higher-order Delta Processing for Dynamic, Frequently Fresh Views Christoph Koch Yanif Ahmad Oliver Kennedy Milos Nikolic Andres

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

FDB: A Query Engine for Factorised Relational Databases

FDB: A Query Engine for Factorised Relational Databases FDB: A Query Engine for Factorised Relational Databases Nurzhan Bakibayev, Dan Olteanu, and Jakub Zavodny Oxford CS Christan Grant cgrant@cise.ufl.edu University of Florida November 1, 2013 cgrant (UF)

More information

receiving excessively large amounts of data from the server, as in the database-as-a-service scenario; in the mediation scenario, the client (mediator

receiving excessively large amounts of data from the server, as in the database-as-a-service scenario; in the mediation scenario, the client (mediator Materializing Views with Minimum Size to Answer Queries (Technical Report) Rada Chirkova North Carolina State University chirkova@csc.ncsu.edu Chen Li UC Irvine chenli@ics.uci.edu Jia Li UC Irvine jiali@ics.uci.edu

More information

How to Wring a Table Dry: Entropy Compression of Relations and Querying of Compressed Relations

How to Wring a Table Dry: Entropy Compression of Relations and Querying of Compressed Relations How to Wring a Table Dry: Entropy Compression of Relations and Querying of Compressed Relations Vijayshankar Raman Garret Swart IBM Almaden Research Center, San Jose, CA 95120 ABSTRACT We present a method

More information

Architecture and Implementation of Database Systems (Winter 2015/16)

Architecture and Implementation of Database Systems (Winter 2015/16) Jens Teubner Architecture & Implementation of DBMS Winter 2015/16 1 Architecture and Implementation of Database Systems (Winter 2015/16) Jens Teubner, DBIS Group jens.teubner@cs.tu-dortmund.de Winter 2015/16

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

Query Evaluation and Optimization

Query Evaluation and Optimization Query Evaluation and Optimization Jan Chomicki University at Buffalo Jan Chomicki () Query Evaluation and Optimization 1 / 21 Evaluating σ E (R) Jan Chomicki () Query Evaluation and Optimization 2 / 21

More information

Conjunctive queries. Many computational problems are much easier for conjunctive queries than for general first-order queries.

Conjunctive queries. Many computational problems are much easier for conjunctive queries than for general first-order queries. Conjunctive queries Relational calculus queries without negation and disjunction. Conjunctive queries have a normal form: ( y 1 ) ( y n )(p 1 (x 1,..., x m, y 1,..., y n ) p k (x 1,..., x m, y 1,..., y

More information

Query processing of pre-partitioned data using Sandwich Operators

Query processing of pre-partitioned data using Sandwich Operators Query processing of pre-partitioned data using Sandwich Operators Stephan Baumann 1, Peter Boncz 2, and Kai-Uwe Sattler 1 1 Ilmenau University of Technology, Ilmenau, Germany, first.last@tu-ilmenau.de,

More information

CMSC 424 Database design Lecture 18 Query optimization. Mihai Pop

CMSC 424 Database design Lecture 18 Query optimization. Mihai Pop CMSC 424 Database design Lecture 18 Query optimization Mihai Pop More midterm solutions Projects do not be late! Admin Introduction Alternative ways of evaluating a given query Equivalent expressions Different

More information

Chapter 3: SQL. Database System Concepts, 5th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use

Chapter 3: SQL. Database System Concepts, 5th Ed. Silberschatz, Korth and Sudarshan See  for conditions on re-use Chapter 3: SQL Database System Concepts, 5th Ed. See www.db-book.com for conditions on re-use Chapter 3: SQL Data Definition Basic Query Structure Set Operations Aggregate Functions Null Values Nested

More information

Name: 1. (a) SQL is an example of a non-procedural query language.

Name: 1. (a) SQL is an example of a non-procedural query language. Name: 1 1. (20 marks) erminology: or each of the following statements, state whether it is true or false. If it is false, correct the statement without changing the underlined text. (Note: there might

More information

Overtaking CPU DBMSes with a GPU in Whole-Query Analytic Processing

Overtaking CPU DBMSes with a GPU in Whole-Query Analytic Processing Overtaking CPU DBMSes with a GPU in Whole-Query Analytic Processing Adnan Agbaria David Minor Natan Peterfreund Eyal Rozenberg Ofer Rosenberg - now at Intel - now at GE Research - now a post-doc at CWI

More information

Relational Model 2: Relational Algebra

Relational Model 2: Relational Algebra Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong The relational model defines: 1 the format by which data should be stored; 2 the operations for querying the data.

More information

JHive: Tool for Integrating Hive for Performance Analysis

JHive: Tool for Integrating Hive for Performance Analysis JHive: Tool for Integrating Hive for Performance Analysis Dipti Shikha Singh 1, Garima Singh 2 1 Student, M.Tech, Computer Science Department, Babu Banarasi Das University, Lucknow, U.P, India 2 Assistant

More information

A Comparison of Three Methods for Join View Maintenance in Parallel RDBMS

A Comparison of Three Methods for Join View Maintenance in Parallel RDBMS A Comparison of Three Methods for Join View Maintenance in Parallel RDBMS Gang Luo Jeffrey F. Naughton Curt J. Ellmann Michael W. Watzke Department of Computer Sciences NCR Advance Development Lab University

More information

Data Warehousing and Decision Support

Data Warehousing and Decision Support Data Warehousing and Decision Support Chapter 23, Part B Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke Views and Decision Support OLAP queries are typically aggregate queries.

More information

Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries Derived Relations Views Modification of the Database Data Definition

Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries Derived Relations Views Modification of the Database Data Definition Chapter 4: SQL Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries Derived Relations Views Modification of the Database Data Definition Language 4.1 Schema Used in Examples

More information

CS 582 Database Management Systems II

CS 582 Database Management Systems II Review of SQL Basics SQL overview Several parts Data-definition language (DDL): insert, delete, modify schemas Data-manipulation language (DML): insert, delete, modify tuples Integrity View definition

More information

The SQL data-definition language (DDL) allows defining :

The SQL data-definition language (DDL) allows defining : Introduction to SQL Introduction to SQL Overview of the SQL Query Language Data Definition Basic Query Structure Additional Basic Operations Set Operations Null Values Aggregate Functions Nested Subqueries

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

L22: The Relational Model (continued) CS3200 Database design (sp18 s2) 4/5/2018

L22: The Relational Model (continued) CS3200 Database design (sp18 s2)   4/5/2018 L22: The Relational Model (continued) CS3200 Database design (sp18 s2) https://course.ccs.neu.edu/cs3200sp18s2/ 4/5/2018 256 Announcements! Please pick up your exam if you have not yet HW6 will include

More information

Lab Validation Report

Lab Validation Report Lab Validation Report ParAccel PADB and NetApp SAN Optimized Solution High Performance Analytics with Advanced Data Management Capabilities By Julie Lockner May 2011 Lab Validation: ParAccel PADB and NetApp

More information

Programming Lecture 3

Programming Lecture 3 Programming Lecture 3 Expressions (Chapter 3) Primitive types Aside: Context Free Grammars Constants, variables Identifiers Variable declarations Arithmetic expressions Operator precedence Assignment statements

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

Semantics in RDF and SPARQL Some Considerations

Semantics in RDF and SPARQL Some Considerations Semantics in RDF and SPARQL Some Considerations Dept. Computer Science, Universidad de Chile Center for Semantic Web Research http://ciws.cl Dagstuhl, June 2017 Semantics RDF and SPARQL 1 / 7 Semantics

More information

CAS CS 460/660 Introduction to Database Systems. Relational Algebra 1.1

CAS CS 460/660 Introduction to Database Systems. Relational Algebra 1.1 CAS CS 460/660 Introduction to Database Systems Relational Algebra 1.1 Relational Query Languages Query languages: Allow manipulation and retrieval of data from a database. Relational model supports simple,

More information

Relational Algebra and SQL. Basic Operations Algebra of Bags

Relational Algebra and SQL. Basic Operations Algebra of Bags Relational Algebra and SQL Basic Operations Algebra of Bags 1 What is an Algebra Mathematical system consisting of: Operands --- variables or values from which new values can be constructed. Operators

More information

MySQL 8.0 What s New in the Optimizer

MySQL 8.0 What s New in the Optimizer MySQL 8.0 What s New in the Optimizer Manyi Lu Director MySQL Optimizer & GIS Team, Oracle October 2016 Copyright Copyright 2 015, 2016,Oracle Oracle and/or and/or its its affiliates. affiliates. All All

More information

Query Processing. Debapriyo Majumdar Indian Sta4s4cal Ins4tute Kolkata DBMS PGDBA 2016

Query Processing. Debapriyo Majumdar Indian Sta4s4cal Ins4tute Kolkata DBMS PGDBA 2016 Query Processing Debapriyo Majumdar Indian Sta4s4cal Ins4tute Kolkata DBMS PGDBA 2016 Slides re-used with some modification from www.db-book.com Reference: Database System Concepts, 6 th Ed. By Silberschatz,

More information

Chapter 4: SQL. Basic Structure

Chapter 4: SQL. Basic Structure Chapter 4: SQL Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries Derived Relations Views Modification of the Database Joined Relations Data Definition Language Embedded SQL

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

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

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

Relational Algebra. Algebra of Bags

Relational Algebra. Algebra of Bags Relational Algebra Basic Operations Algebra of Bags What is an Algebra Mathematical system consisting of: Operands --- variables or values from which new values can be constructed. Operators --- symbols

More information

Data Integration: Logic Query Languages

Data Integration: Logic Query Languages Data Integration: Logic Query Languages Jan Chomicki University at Buffalo Datalog Datalog A logic language Datalog programs consist of logical facts and rules Datalog is a subset of Prolog (no data structures)

More information

Fundamentals of Database Systems

Fundamentals of Database Systems Fundamentals of Database Systems Assignment: 4 September 21, 2015 Instructions 1. This question paper contains 10 questions in 5 pages. Q1: Calculate branching factor in case for B- tree index structure,

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

Semantic Adaptation of Schema Mappings when Schemas Evolve

Semantic Adaptation of Schema Mappings when Schemas Evolve Semantic Adaptation of Schema Mappings when Schemas Evolve Cong Yu Lucian Popa Dept. of EECS, Univ. of Michigan IBM Almaden Research Center congy@umich.edu lucian@almaden.ibm.com Abstract Schemas evolve

More information

1/3/2015. Column-Store: An Overview. Row-Store vs Column-Store. Column-Store Optimizations. Compression Compress values per column

1/3/2015. Column-Store: An Overview. Row-Store vs Column-Store. Column-Store Optimizations. Compression Compress values per column //5 Column-Store: An Overview Row-Store (Classic DBMS) Column-Store Store one tuple ata-time Store one column ata-time Row-Store vs Column-Store Row-Store Column-Store Tuple Insertion: + Fast Requires

More information

Evaluation of Relational Operations

Evaluation of Relational Operations Evaluation of Relational Operations Chapter 12, Part A Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Relational Operations We will consider how to implement: Selection ( ) Selects a subset

More information

Optimization Overview

Optimization Overview Lecture 17 Optimization Overview Lecture 17 Lecture 17 Today s Lecture 1. Logical Optimization 2. Physical Optimization 3. Course Summary 2 Lecture 17 Logical vs. Physical Optimization Logical optimization:

More information

Versatile XQuery Processing in MapReduce

Versatile XQuery Processing in MapReduce Versatile XQuery Processing in MapReduce Caetano Sauer, Sebastian Bächle, and Theo Härder University of Kaiserslautern P.O. Box 3049, 67653 Kaiserslautern, Germany {csauer,baechle,haerder}@cs.uni-kl.de

More information

Chapter 3: SQL. Chapter 3: SQL

Chapter 3: SQL. Chapter 3: SQL Chapter 3: SQL Database System Concepts, 5th Ed. See www.db-book.com for conditions on re-use Chapter 3: SQL Data Definition Basic Query Structure Set Operations Aggregate Functions Null Values Nested

More information

StreamOLAP. Salman Ahmed SHAIKH. Cost-based Optimization of Stream OLAP. DBSJ Japanese Journal Vol. 14-J, Article No.

StreamOLAP. Salman Ahmed SHAIKH. Cost-based Optimization of Stream OLAP. DBSJ Japanese Journal Vol. 14-J, Article No. StreamOLAP Cost-based Optimization of Stream OLAP Salman Ahmed SHAIKH Kosuke NAKABASAMI Hiroyuki KITAGAWA Salman Ahmed SHAIKH Toshiyuki AMAGASA (SPE) OLAP OLAP SPE SPE OLAP OLAP OLAP Due to the increase

More information

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence What s a database system? Review of Basic Database Concepts CPS 296.1 Topics in Database Systems According to Oxford Dictionary Database: an organized body of related information Database system, DataBase

More information

RQL: Retrospective Computations over Snapshot Sets

RQL: Retrospective Computations over Snapshot Sets Industrial and Applications Paper RQL: Retrospective Computations over Snapshot Sets Nikos Tsikoudis Brandeis University tsikudis@cs.brandeis.edu Liuba Shrira Brandeis University liuba@cs.brandeis.edu

More information