SEIZE THE DATA SEIZE THE DATA. 2015

Size: px
Start display at page:

Download "SEIZE THE DATA SEIZE THE DATA. 2015"

Transcription

1 1 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

2 Advanced Projection Design Herb Collins, Vertica Training August 10, 2015

3 Projection Refresher 3 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

4 Projections Associated with Tables ANCHOR TABLE Logical Customer table A B C D PROJECTIONS Physical C A B D B D customer_p1 (superprojection) C customer_p2 (query-specific) C A customer_p3 (query-specific 4 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

5 Create Projection DDL CREATE PROJECTION product_fact_data ( product_desc ENCODING AUTO, sku_number ENCODING RLE, category_desc ENCODING RLE, product_cost ENCODING AUTO ) Define Columns and Encoding Types 5 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

6 Create Projection DDL CREATE PROJECTION product_fact_data ( product_desc ENCODING AUTO, sku_number ENCODING RLE, category_desc ENCODING RLE, product_cost ENCODING AUTO ) AS SELECT product_desc, sku_number, category_desc, product_cost FROM public.product_fact Define Columns and Encoding Types Base Query (More complex queries allowed) 6 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

7 Create Projection DDL CREATE PROJECTION product_fact_data ( product_desc ENCODING AUTO, sku_number ENCODING RLE, category_desc ENCODING RLE, product_cost ENCODING AUTO ) AS SELECT product_desc, sku_number, category_desc, product_cost FROM public.product_fact ORDER BY sku_number, category_desc Define Columns and Encoding Types Base Query (More complex queries allowed) Sort Order 7 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

8 Create Projection DDL CREATE PROJECTION product_fact_data ( product_desc ENCODING AUTO, sku_number ENCODING RLE, category_desc ENCODING RLE, product_cost ENCODING AUTO ) AS SELECT product_desc, sku_number, category_desc, product_cost FROM public.product_fact ORDER BY sku_number, category_desc SEGMENTED BY HASH (category_desc, department_desc); Define Columns and Encoding Types Base Query (More complex queries allowed) Sort Order Segmentation 8 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

9 Optimize Joins Column Order 9 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

10 Determine Projection Sort Order In the ORDER BY statement: 1. Start with Query Predicates Order predicates from lowest to highest cardinality Run Length Encode columns in sort order 2. Order the columns based on Group By Order from lowest to highest cardinality 3. Order remaining columns until average run length is less than ~10 4. Factor in special conditions Join optimization Identically Segmented projections Group By optimization 10 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

11 ORDER BY For Query Predicate CREATE PROJECTION product_fact_data ( product_desc ENCODING AUTO, sku_number ENCODING RLE, category_desc ENCODING RLE, product_cost ENCODING AUTO ) AS SELECT product_desc, sku_number, category_desc, product_cost FROM public.product_fact ORDER BY sku_number, category_desc SEGMENTED BY HASH (category_desc, department_desc); Define Columns and Encoding Types SELECT * FROM public.product_fact WHERE category_desc = housewares AND sku_number = KM745 ; Base Query (More complex queries allowed) Sort Order Segmentation 11 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

12 ORDER BY For GROUP BY CREATE PROJECTION product_fact_data ( product_desc ENCODING AUTO, sku_number ENCODING RLE, category_desc ENCODING RLE, product_cost ENCODING AUTO ) SELECT category_desc, sum(product_cost) FROM public.product_fact AS GROUP BY category_desc; SELECT product_desc, sku_number, category_desc, product_cost FROM public.product_fact ORDER BY category_desc Define Columns and Encoding Types Base Query (More complex queries allowed) Sort Order SEGMENTED BY HASH (category_desc, department_desc); Segmentation 12 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

13 ORDER BY For JOIN CREATE PROJECTION product_fact_data ( product_desc ENCODING AUTO, sku_number ENCODING RLE, category_desc ENCODING RLE, product_cost ENCODING AUTO ) AS SELECT product_desc, sku_number, F.sku_number = D.sku_number; category_desc, product_cost FROM public.product_fact ORDER BY sku_number Define Columns and Encoding Types SELECT * FROM product_fact F, product_dim D WHERE Base Query (More complex queries allowed) Sort Order SEGMENTED BY HASH (category_desc, department_desc); Segmentation 13 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

14 Optimize Joins Design projections so that the Optimizer will select the optimal join operator Create projections for Merge Join or Hash Join Minimize network operations Segment projections on the join keys so that join record matching is local Eliminate query-time join entirely Use a Pre-Join projection Denormalize externally 14 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

15 HASH JOIN In Explain Plan => EXPLAIN SELECT CD.annual_income,OSI.sale_date_key -> FROM online_sales.online_sales_fact OSI -> FULL OUTER JOIN customer_dimension CD ON CD.customer_key = OSI.customer_key; Access Path: +-JOIN HASH [FullOuter] [Cost: 18K, Rows: 5M] (PATH ID: 1) Outer (RESEGMENT) Inner (FILTER) Join Cond: (CD.customer_key = OSI.customer_key) Execute on: All Nodes +-- Outer -> STORAGE ACCESS for OSI [Cost: 3K, Rows: 5M] (PATH ID: 2) Projection: online_sales.online_sales_fact_dbd_12_seg_vmartdb_design_vmartdb_design Materialize: OSI.sale_date_key, OSI.customer_key Execute on: All Nodes +-- Inner -> STORAGE ACCESS for CD [Cost: 264, Rows: 50K] (PATH ID: 3) Projection: public.customer_dimension_dbd_1_rep_vmartdb_design_vmartdb_design_node0001 Materialize: CD.annual_income, CD.customer_key Execute on: All Nodes 15 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

16 HASH JOIN Operator The most common join operator requires no special optimization Hash table is built on dimension table (inner) Fact table (outer) is scanned, rows that match dimension rows are output as result set C B D E A E B A Join Column (Not 1 st in ORDER BY) No match Found a match Output tuple Hash Table (In Memory) Value 16 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. D B C A Build Hash Table D B C A Join Column (Not 1 st in ORDER BY)

17 MERGEJOIN In Explain Plan => EXPLAIN SELECT * FROM fact JOIN dim ON x=y JOIN ext on y=z; Access Path: +-JOIN MERGEJOIN(inputs presorted) [Cost: 815, Rows: 10K (NO STATISTICS)] (PATH ID: 1) Join Cond: (dim.y = ext.z) Materialize at Output: fact.x Execute on: All Nodes +-- Outer -> JOIN MERGEJOIN(inputs presorted) [Cost: 408, Rows: 10K (NO STATISTICS)] (PATH ID: 2) Join Cond: (fact.x = dim.y) Execute on: All Nodes +-- Outer -> STORAGE ACCESS for fact [Cost: 202, Rows: 10K (NO STATISTICS)] (PATH ID: 3) Projection: public.fact_super Materialize: fact.x Execute on: All Nodes 17 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

18 MERGEJOIN Operator If dimension table does not fit into memory, use merge join Faster for large joins because both tables are streamed through memory No need to go to disk Join Column (1 st in ORDER BY) A B B C D D D E X D M M N T X N Output Tuple C D B E A = B C A D 18 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. A B C D No more values. Join completed. Join Column (1 st in ORDER BY)

19 Merge Join Requirements Data on both sides of the join must be sorted by the join key column(s) By ordering the join key in projections By using a subquery with an ORDER BY clause Equality predicates will be executed first to reduce the size of the merge join Optimizer will bias towards projections for predicates Predicate column(s) can be first in projection ORDER BY only if the query has single-value equality predicates for the column(s) Recommended for large Dimensions to avoid disk spill 19 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

20 Optimize for a Merge Join Order by the join columns for both Fact and Dimension projections Sample query: SELECT * FROM Fact F, Dim D WHERE F.id = D.id; Sample projections: CREATE PROJECTION Fact_p ( a ENCODING RLE, b ENCODING RLE, c, id ENCODING RLE ) AS SELECT a, b, c, id FROM Fact ORDER BY id, b SEGMENTED BY HASH(c) ALL NODES; CREATE PROJECTION Dim_p ( x ENCODING RLE, y ENCODING RLE, z, id ENCODING RLE ) AS SELECT x, y, z,id FROM Dim ORDER BY id, x, y UNSEGMENTED ALL NODES; 20 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

21 Merge Join with Predicate Pushdown Order the fact projection by filter column(s) in predicate Generally best to optimize for filter first to eliminate any data that does not need to be joined. Then, order by the join columns for both Fact and Dimension projections Sample query: SELECT * FROM Fact F, Dim D WHERE F.id = D.id AND f.a = 10; Sample projections: CREATE PROJECTION Fact_p ( a ENCODING RLE, b ENCODING RLE, c, id ENCODING RLE ) AS SELECT a, b, c, id FROM Fact ORDER BY a,id, b SEGMENTED BY HASH(c) ALL NODES; CREATE PROJECTION Dim_p ( x ENCODING RLE, y ENCODING RLE, z, id ENCODING RLE ) AS SELECT x, y, z,id FROM Dim ORDER BY id, x, y UNSEGMENTED ALL NODES; 21 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

22 Optimize Joins Segmentation 22 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

23 Optimize Joins Network Operations Requirement for local joins Matching rows from fact and dimension table must be on the same node Segmented fact to replicated dimension join Fact: SEGMENTED BY HASH (id) ALL NODES; Dimension: UNSEGMENTED ALL NODES; Identically Segmented Projections Both projections segmented on join key Final results aggregated on initiator node 23 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

24 Design for Local Joins Replicate small dimension projections and segment large fact projections Dimension Data Carol Jim Kim Fact Data trial results ABC's storm rt Javier This week Go Broncos! Pats-onside Segmented Projection trial results ABC's storm rt Javier This week Go Broncos! Pats-onside Replicated/Unsegmente d Projection Carol Jimmy Kim Carol Jimmy Kim Carol Jimmy Kim Node1 Node2 Node3 24 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

25 Segmented and Replicated Projections Segment fact, replicate dimension Sample query: SELECT * FROM fact F JOIN dim D ON F.id = D.id; Sample projections: CREATE PROJECTION fact_p ( a ENCODING RLE, b ENCODING RLE, c ENCODING RLE, id ) AS SELECT a, b, c, id FROM fact ORDER BY id, a, b, c SEGMENTED BY HASH(id) ALL NODES; CREATE PROJECTION dim_p ( x ENCODING RLE, y ENCODING RLE, z, id ) AS SELECT x, y, z,id FROM dim ORDER BY id, x, y UNSEGMENTED ALL NODES; 25 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

26 Identically Segmented Projections Segment by the join columns for both the fact and dimension Sample query: SELECT * FROM fact F JOIN dim D ON F.id = D.id; Sample projections; CREATE PROJECTION fact_p ( a ENCODING RLE, b ENCODING RLE, c ENCODING RLE, id ) AS SELECT a, b, c, id FROM fact ORDER BY id, a, b, c SEGMENTED BY HASH(id) ALL NODES; CREATE PROJECTION dim_p ( x ENCODING RLE, y ENCODING RLE, z, id ) AS SELECT x, y, z,id FROM dim ORDER BY id, x, y SEGMENTED BY HASH(id) ALL NODES; 26 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

27 Network Operations If data to be joined is not locally available, data is redistributed at runtime, requiring network operations Look for these network operators in the Explain Plan BROADCAST (sends temporary full copy of data to each node) Access Path: +-JOIN HASH [LeftOuter] [Cost: 40K, Rows: 10K (NO STATISTICS)] (PATH ID: 1) Inner (BROADCAST) Join Filter: (T1.a > T2.y) Materialize at Output: T1.b Execute on: All Nodes RESEGMENT (sends temporary ISP segments to each node) Access Path: +-JOIN HASH [Cost: 639, Rows: 10K (NO STATISTICS)] (PATH ID: 1) Inner (RESEGMENT) Join Cond: (T1.a = T2.y) Materialize at Output: T1.b Execute on: All Nodes 27 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

28 Optimize Group By 28 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

29 Optimize Group By Design for optimized Group By operator Create projections for Group By Pipe or Group By Hash Design for local Group By Segment such that each group will be only one node 29 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

30 Group By Hash Operator Query: SELECT count(*) FROM cust GROUP BY cust.state; Hash table must be completely built before results can be output to the user A A B B B C D D CA MA AL CA DE AL MA DE GROUP BY Column (Not 1 st in ORDER BY) Hash Map (Stored In Memory) Value Count CA 12 MA 12 AL 12 DE 12 Return to User 30 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

31 Group By Pipe Operator SELECT count(*) FROM cust GROUP BY cust.state; Less memory is used and runs faster than Group By Hash GROUP BY Column (1 st in ORDER BY) AL AL CA CA DE DE MA MA C D L M A M E L Count( CB ) 12 = Return to User 31 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

32 Group By Pipe Group By Pipe is critical to aggregate large amounts of data OR a large number of groups Can stream an infinite number of tuples Total number of groups does not matter If there is a selective predicate, optimize for that initially then for group by Equality predicates are executed before a Group by Pipe Output of Group by Pipe is sorted Look for Group by operator in query Explain Plan GROUP BY HASH or GROUP BY PIPELINED 32 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

33 Optimize for a Group By Pipe All grouping columns must be first in projection sort order Sample query: SELECT count(*) FROM cust GROUP BY a, b, c; Sample projection: CREATE PROJECTION cust_p ( a ENCODING RLE, b ENCODING RLE, c ENCODING RLE, d, e ) AS SELECT a, b, c, d, e FROM cust ORDER BY a, b, c SEGMENTED BY HASH(d) ALL NODES; 33 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

34 Distributed Group By If data is randomly distributed among nodes, Vertica must resegment data to accomplish Group by Resegment on Group By column(s) What if each group exists only on one node? Achieved by segmenting on the Group By columns Query explain plan will show resegmentation Distributed Group By will show RESEGMENT GROUP 34 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

35 Optimize for a Local Group By Segment by columns in the Group By Sample query: SELECT count(*) FROM cust GROUP BY a, b, c; Sample projection: CREATE PROJECTION cust_p ( a ENCODING RLE, b ENCODING RLE, c ENCODING RLE, d, e ) AS SELECT a, b, c, d, e FROM cust ORDER BY a, b, c SEGMENTED BY HASH(a, b, c) ALL NODES; 35 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

36 Resegment for Group By If projection SEGMENTED BY HASH(a,b) ALL NODES and query uses GROUP BY a Resegmentation required due to additional segmentation value not present in Group By GROUP BY a,b No resegmentation at runtime GROUP BY a,b,c No resegmentation at runtime GROUP BY a+1,b Resegmentation required due to expression on column a 36 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

37 Partially Sorted Group By Feature enabled by default Allows the Optimizer to improve the performance of aggregate queries on large data sets by leveraging the sort order of columns in the GROUP BY clause 37 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

38 Explain Plan Example The query plan shows that the optimizer uses the partially sorted GROUP BY column, story_key is one of the sort columns in the projection, store.store_sales_fact, and contains more than one call to aggregate functions 38 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

39 Aggregated Projections 39 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

40 Live Aggregated Projections An anchor table must exist Anchor Table At least one regular projection must exist to serve as the base for the aggregated projection Base Projection Live aggregated projection is based off of one regular projection Live Aggregated Projection A B C B A C B A C D = A G G E = A G G Queries containing aggregates are made directly to the Live Aggregate Projection select * from projection_name_agg; 40 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

41 Projections with Expressions An anchor table must exist Anchor Table At least one regular projection must exist to serve as the base for the projection with expressions Base Projection Projection with Expressions is based off of one regular projection Projection with Expressions A B C B A C B A C D = A * B E = C / A Queries containing columns with expressions are made directly to the Projection with Expressions. select * from projection_name; 41 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

42 High Cardinality Columns 42 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

43 High Cardinality Column Lookups SELECT Address FROM cdr_table WHERE Number=' '; Problem: Number column is high cardinality, so RLE is ineffective 43 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

44 High Cardinality Column Split (1 of 3) Create and order by a new column called Area_Code If SELECT COUNT (distinct Number) = 13 million, then we would create a new column such that SELECT COUNT (distinct Area_Code) 3.6k 44 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

45 High Cardinality Column Split (2 of 3) Add the new column to the projection sort order ORDER BY Area_Code, Number... Add the additional predicate to the SQL query Original Query SELECT Address FROM cdr_table WHERE Number=' '; New Query SELECT Address FROM cdr_table WHERE Number=' ' and Area_Code='978'; 45 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

46 High Cardinality Column Split (3 of 3) Pro Low cardinality column can be mixed in with other low-cardinality predicate columns early in the sort order Con Tables, projections, and queries must be modified 46 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

47 QUESTIONS? Please attend our Q&A with HP Big Data experts today Marina Ballroom, Lobby level 10:15 am 10:30 am 12:00 pm 1:00 pm 2:30 pm 3:00 pm 4:30 pm 5:00 pm

48

SEIZE THE DATA SEIZE THE DATA. 2015

SEIZE THE DATA SEIZE THE DATA. 2015 1 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. Vertica Resource Management Ramesh Narayanan, Vertica Professional Services

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe CHAPTER 19 Query Optimization Introduction Query optimization Conducted by a query optimizer in a DBMS Goal: select best available strategy for executing query Based on information available Most RDBMSs

More information

Querying Data with Transact SQL

Querying Data with Transact SQL Course 20761A: Querying Data with Transact SQL Course details Course Outline Module 1: Introduction to Microsoft SQL Server 2016 This module introduces SQL Server, the versions of SQL Server, including

More information

SQL Query Writing Tips To Improve Performance in Db2 and Db2 Warehouse on Cloud

SQL Query Writing Tips To Improve Performance in Db2 and Db2 Warehouse on Cloud SQL Query Writing Tips To Improve Performance in Db2 and Db2 Warehouse on Cloud Calisto Zuzarte IBM St. Louis Db2 User s Group 201803 Tue, March 06, 2018 Db2 Warehouse Db2 Warehouse on Cloud Integrated

More information

Vertica s Design: Basics, Successes, and Failures

Vertica s Design: Basics, Successes, and Failures Vertica s Design: Basics, Successes, and Failures Chuck Bear CIDR 2015 January 5, 2015 1. Vertica Basics: Storage Format Design Goals SQL (for the ecosystem and knowledge pool) Clusters of commodity hardware

More information

Query Processing. Introduction to Databases CompSci 316 Fall 2017

Query Processing. Introduction to Databases CompSci 316 Fall 2017 Query Processing Introduction to Databases CompSci 316 Fall 2017 2 Announcements (Tue., Nov. 14) Homework #3 sample solution posted in Sakai Homework #4 assigned today; due on 12/05 Project milestone #2

More information

Examples of Physical Query Plan Alternatives. Selected Material from Chapters 12, 14 and 15

Examples of Physical Query Plan Alternatives. Selected Material from Chapters 12, 14 and 15 Examples of Physical Query Plan Alternatives Selected Material from Chapters 12, 14 and 15 1 Query Optimization NOTE: SQL provides many ways to express a query. HENCE: System has many options for evaluating

More information

Introduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe

Introduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe Introduction to Query Processing and Query Optimization Techniques Outline Translating SQL Queries into Relational Algebra Algorithms for External Sorting Algorithms for SELECT and JOIN Operations Algorithms

More information

Something to think about. Problems. Purpose. Vocabulary. Query Evaluation Techniques for large DB. Part 1. Fact:

Something to think about. Problems. Purpose. Vocabulary. Query Evaluation Techniques for large DB. Part 1. Fact: Query Evaluation Techniques for large DB Part 1 Fact: While data base management systems are standard tools in business data processing they are slowly being introduced to all the other emerging data base

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Subquery: There are basically three types of subqueries are:

Subquery: There are basically three types of subqueries are: Subquery: It is also known as Nested query. Sub queries are queries nested inside other queries, marked off with parentheses, and sometimes referred to as "inner" queries within "outer" queries. Subquery

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Course 20761A: Querying Data with Transact-SQL Page 1 of 5 Querying Data with Transact-SQL Course 20761A: 2 days; Instructor-Led Introduction The main purpose of this 2 day instructor led course is to

More information

Chapter 18 Strategies for Query Processing. We focus this discussion w.r.t RDBMS, however, they are applicable to OODBS.

Chapter 18 Strategies for Query Processing. We focus this discussion w.r.t RDBMS, however, they are applicable to OODBS. Chapter 18 Strategies for Query Processing We focus this discussion w.r.t RDBMS, however, they are applicable to OODBS. 1 1. Translating SQL Queries into Relational Algebra and Other Operators - SQL is

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL Course: 20761 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2016 Duration: 24 HRs. ABOUT THIS COURSE This course is designed to introduce

More information

CSC 261/461 Database Systems Lecture 19

CSC 261/461 Database Systems Lecture 19 CSC 261/461 Database Systems Lecture 19 Fall 2017 Announcements CIRC: CIRC is down!!! MongoDB and Spark (mini) projects are at stake. L Project 1 Milestone 4 is out Due date: Last date of class We will

More information

Performance Optimization for Informatica Data Services ( Hotfix 3)

Performance Optimization for Informatica Data Services ( Hotfix 3) Performance Optimization for Informatica Data Services (9.5.0-9.6.1 Hotfix 3) 1993-2015 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means (electronic,

More information

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761)

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Course Length: 3 days Course Delivery: Traditional Classroom Online Live MOC on Demand Course Overview The main purpose of this

More information

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Administrivia. Faloutsos/Pavlo CMU /615

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Administrivia. Faloutsos/Pavlo CMU /615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications C. Faloutsos A. Pavlo Lecture#14(b): Implementation of Relational Operations Administrivia HW4 is due today. HW5 is out. Faloutsos/Pavlo

More information

20761 Querying Data with Transact SQL

20761 Querying Data with Transact SQL Course Overview The main purpose of this course is to give students a good understanding of the Transact-SQL language which is used by all SQL Server-related disciplines; namely, Database Administration,

More information

University of Waterloo Midterm Examination Sample Solution

University of Waterloo Midterm Examination Sample Solution 1. (4 total marks) University of Waterloo Midterm Examination Sample Solution Winter, 2012 Suppose that a relational database contains the following large relation: Track(ReleaseID, TrackNum, Title, Length,

More information

Querying Data with Transact-SQL (20761)

Querying Data with Transact-SQL (20761) Querying Data with Transact-SQL (20761) Formato do curso: Presencial e Live Training Preço: 1630 Nível: Iniciado Duração: 35 horas The main purpose of this 5 day instructor led course is to give students

More information

Querying Microsoft SQL Server 2014

Querying Microsoft SQL Server 2014 Querying Microsoft SQL Server 2014 Course: 20461 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2014 Duration: 40 Hours ABOUT THIS COURSE This forty hours of instructor-led

More information

Reminders. Query Optimizer Overview. The Three Parts of an Optimizer. Dynamic Programming. Search Algorithm. CSE 444: Database Internals

Reminders. Query Optimizer Overview. The Three Parts of an Optimizer. Dynamic Programming. Search Algorithm. CSE 444: Database Internals Reminders CSE 444: Database Internals Lab 2 is due on Wednesday HW 5 is due on Friday Lecture 11 Query Optimization (part 2) CSE 444 - Winter 2017 1 CSE 444 - Winter 2017 2 Query Optimizer Overview Input:

More information

Outline. Database Management and Tuning. Outline. Join Strategies Running Example. Index Tuning. Johann Gamper. Unit 6 April 12, 2012

Outline. Database Management and Tuning. Outline. Join Strategies Running Example. Index Tuning. Johann Gamper. Unit 6 April 12, 2012 Outline Database Management and Tuning Johann Gamper Free University of Bozen-Bolzano Faculty of Computer Science IDSE Unit 6 April 12, 2012 1 Acknowledgements: The slides are provided by Nikolaus Augsten

More information

Algorithms for Query Processing and Optimization. 0. Introduction to Query Processing (1)

Algorithms for Query Processing and Optimization. 0. Introduction to Query Processing (1) Chapter 19 Algorithms for Query Processing and Optimization 0. Introduction to Query Processing (1) Query optimization: The process of choosing a suitable execution strategy for processing a query. Two

More information

Data Warehousing (Special Indexing Techniques)

Data Warehousing (Special Indexing Techniques) Data Warehousing (Special Indexing Techniques) Naveed Iqbal, Assistant Professor NUCES, Islamabad Campus (Lecture Slides Weeks # 13&14) Special Index Structures Inverted index Bitmap index Cluster index

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL General Description This course is designed to introduce students to Transact-SQL. It is designed in such a way that the first three days can be taught as a course to students

More information

[AVNICF-MCSASQL2012]: NICF - Microsoft Certified Solutions Associate (MCSA): SQL Server 2012

[AVNICF-MCSASQL2012]: NICF - Microsoft Certified Solutions Associate (MCSA): SQL Server 2012 [AVNICF-MCSASQL2012]: NICF - Microsoft Certified Solutions Associate (MCSA): SQL Server 2012 Length Delivery Method : 5 Days : Instructor-led (Classroom) Course Overview Participants will learn technical

More information

Database Systems CSE 414

Database Systems CSE 414 Database Systems CSE 414 Lecture 15-16: Basics of Data Storage and Indexes (Ch. 8.3-4, 14.1-1.7, & skim 14.2-3) 1 Announcements Midterm on Monday, November 6th, in class Allow 1 page of notes (both sides,

More information

Administrivia. CS 133: Databases. Cost-based Query Sub-System. Goals for Today. Midterm on Thursday 10/18. Assignments

Administrivia. CS 133: Databases. Cost-based Query Sub-System. Goals for Today. Midterm on Thursday 10/18. Assignments Administrivia Midterm on Thursday 10/18 CS 133: Databases Fall 2018 Lec 12 10/16 Prof. Beth Trushkowsky Assignments Lab 3 starts after fall break No problem set out this week Goals for Today Cost-based

More information

Architecture and Implementation of Database Systems (Winter 2014/15)

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

More information

Advanced Database Systems

Advanced Database Systems Lecture IV Query Processing Kyumars Sheykh Esmaili Basic Steps in Query Processing 2 Query Optimization Many equivalent execution plans Choosing the best one Based on Heuristics, Cost Will be discussed

More information

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 9 - Query optimization

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 9 - Query optimization CSE 544 Principles of Database Management Systems Magdalena Balazinska Fall 2007 Lecture 9 - Query optimization References Access path selection in a relational database management system. Selinger. et.

More information

CSE 444: Database Internals. Lecture 11 Query Optimization (part 2)

CSE 444: Database Internals. Lecture 11 Query Optimization (part 2) CSE 444: Database Internals Lecture 11 Query Optimization (part 2) CSE 444 - Spring 2014 1 Reminders Homework 2 due tonight by 11pm in drop box Alternatively: turn it in in my office by 4pm, or in Priya

More information

CS122 Lecture 4 Winter Term,

CS122 Lecture 4 Winter Term, CS122 Lecture 4 Winter Term, 2014-2015 2 SQL Query Transla.on Last time, introduced query evaluation pipeline SQL query SQL parser abstract syntax tree SQL translator relational algebra plan query plan

More information

Query optimization. Elena Baralis, Silvia Chiusano Politecnico di Torino. DBMS Architecture D B M G. Database Management Systems. Pag.

Query optimization. Elena Baralis, Silvia Chiusano Politecnico di Torino. DBMS Architecture D B M G. Database Management Systems. Pag. Database Management Systems DBMS Architecture SQL INSTRUCTION OPTIMIZER MANAGEMENT OF ACCESS METHODS CONCURRENCY CONTROL BUFFER MANAGER RELIABILITY MANAGEMENT Index Files Data Files System Catalog DATABASE

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.830 Database Systems: Fall 2015 Quiz I There are 12 questions and 13 pages in this quiz booklet. To receive

More information

Outline. Query Processing Overview Algorithms for basic operations. Query optimization. Sorting Selection Join Projection

Outline. Query Processing Overview Algorithms for basic operations. Query optimization. Sorting Selection Join Projection Outline Query Processing Overview Algorithms for basic operations Sorting Selection Join Projection Query optimization Heuristics Cost-based optimization 19 Estimate I/O Cost for Implementations Count

More information

7. Query Processing and Optimization

7. Query Processing and Optimization 7. Query Processing and Optimization Processing a Query 103 Indexing for Performance Simple (individual) index B + -tree index Matching index scan vs nonmatching index scan Unique index one entry and one

More information

New Requirements. Advanced Query Processing. Top-N/Bottom-N queries Interactive queries. Skyline queries, Fast initial response time!

New Requirements. Advanced Query Processing. Top-N/Bottom-N queries Interactive queries. Skyline queries, Fast initial response time! Lecture 13 Advanced Query Processing CS5208 Advanced QP 1 New Requirements Top-N/Bottom-N queries Interactive queries Decision making queries Tolerant of errors approximate answers acceptable Control over

More information

Aster Data Basics Class Outline

Aster Data Basics Class Outline Aster Data Basics Class Outline CoffingDW education has been customized for every customer for the past 20 years. Our classes can be taught either on site or remotely via the internet. Education Contact:

More information

Chapter 3. Algorithms for Query Processing and Optimization

Chapter 3. Algorithms for Query Processing and Optimization Chapter 3 Algorithms for Query Processing and Optimization Chapter Outline 1. Introduction to Query Processing 2. Translating SQL Queries into Relational Algebra 3. Algorithms for External Sorting 4. Algorithms

More information

Track Join. Distributed Joins with Minimal Network Traffic. Orestis Polychroniou! Rajkumar Sen! Kenneth A. Ross

Track Join. Distributed Joins with Minimal Network Traffic. Orestis Polychroniou! Rajkumar Sen! Kenneth A. Ross Track Join Distributed Joins with Minimal Network Traffic Orestis Polychroniou Rajkumar Sen Kenneth A. Ross Local Joins Algorithms Hash Join Sort Merge Join Index Join Nested Loop Join Spilling to disk

More information

DB2 9 for z/os Selected Query Performance Enhancements

DB2 9 for z/os Selected Query Performance Enhancements Session: C13 DB2 9 for z/os Selected Query Performance Enhancements James Guo IBM Silicon Valley Lab May 10, 2007 10:40 a.m. 11:40 a.m. Platform: DB2 for z/os 1 Table of Content Cross Query Block Optimization

More information

Sepand Gojgini. ColumnStore Index Primer

Sepand Gojgini. ColumnStore Index Primer Sepand Gojgini ColumnStore Index Primer SQLSaturday Sponsors! Titanium & Global Partner Gold Silver Bronze Without the generosity of these sponsors, this event would not be possible! Please, stop by the

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

Querying Data with Transact-SQL (761)

Querying Data with Transact-SQL (761) Querying Data with Transact-SQL (761) Manage data with Transact-SQL Create Transact-SQL SELECT queries Identify proper SELECT query structure, write specific queries to satisfy business requirements, construct

More information

Introduction to Database Systems CSE 344

Introduction to Database Systems CSE 344 Introduction to Database Systems CSE 344 Lecture 6: Basic Query Evaluation and Indexes 1 Announcements Webquiz 2 is due on Tuesday (01/21) Homework 2 is posted, due week from Monday (01/27) Today: query

More information

Firebird in 2011/2012: Development Review

Firebird in 2011/2012: Development Review Firebird in 2011/2012: Development Review Dmitry Yemanov mailto:dimitr@firebirdsql.org Firebird Project http://www.firebirdsql.org/ Packages Released in 2011 Firebird 2.1.4 March 2011 96 bugs fixed 4 improvements,

More information

EECS 647: Introduction to Database Systems

EECS 647: Introduction to Database Systems EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2009 External Sorting Today s Topic Implementing the join operation 4/8/2009 Luke Huan Univ. of Kansas 2 Review DBMS Architecture

More information

20761B: QUERYING DATA WITH TRANSACT-SQL

20761B: QUERYING DATA WITH TRANSACT-SQL ABOUT THIS COURSE This 5 day course is designed to introduce students to Transact-SQL. It is designed in such a way that the first three days can be taught as a course to students requiring the knowledge

More information

Overview of Query Processing

Overview of Query Processing ICS 321 Fall 2013 Overview of Query Processing Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 11/20/2013 Lipyeow Lim -- University of Hawaii at Manoa 1

More information

Optimizer Challenges in a Multi-Tenant World

Optimizer Challenges in a Multi-Tenant World Optimizer Challenges in a Multi-Tenant World Pat Selinger pselinger@salesforce.come Classic Query Optimizer Concepts & Assumptions Relational Model Cost = X * CPU + Y * I/O Cardinality Selectivity Clustering

More information

Magda Balazinska - CSE 444, Spring

Magda Balazinska - CSE 444, Spring Query Optimization Algorithm CE 444: Database Internals Lectures 11-12 Query Optimization (part 2) Enumerate alternative plans (logical & physical) Compute estimated cost of each plan Compute number of

More information

Vertica Error Messages

Vertica Error Messages HPE Vertica Analytic Database Software Version: 7.2.x Document Release Date: 10/10/2017 Legal Notices Warranty The only warranties for Hewlett Packard Enterprise products and services are set forth in

More information

SelfTestEngine.PR000041_70questions

SelfTestEngine.PR000041_70questions SelfTestEngine.PR000041_70questions Number: PR000041 Passing Score: 800 Time Limit: 120 min File Version: 20.02 http://www.gratisexam.com/ This is the best VCE I ever made. Try guys and if any suggestion

More information

Exam Name: Netezza Platform Software v6

Exam Name: Netezza Platform Software v6 Vendor: IBM Exam Code: 000-553 Exam Name: Netezza Platform Software v6 Version: DEMO 1.Which CREATE DATABASE attributes are required? A. The database name. B. The database name and the redo log file name.

More information

Administrivia. Relational Query Optimization (this time we really mean it) Review: Query Optimization. Overview: Query Optimization

Administrivia. Relational Query Optimization (this time we really mean it) Review: Query Optimization. Overview: Query Optimization Relational Query Optimization (this time we really mean it) R&G hapter 15 Lecture 25 dministrivia Homework 5 mostly available It will be due after classes end, Monday 12/8 Only 3 more lectures left! Next

More information

Evaluation of Relational Operations: Other Techniques. Chapter 14 Sayyed Nezhadi

Evaluation of Relational Operations: Other Techniques. Chapter 14 Sayyed Nezhadi Evaluation of Relational Operations: Other Techniques Chapter 14 Sayyed Nezhadi Schema for Examples Sailors (sid: integer, sname: string, rating: integer, age: real) Reserves (sid: integer, bid: integer,

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL Course 20761C 5 Days Instructor-led, Hands on Course Information The main purpose of the course is to give students a good understanding of the Transact- SQL language which

More information

HP Integration with Incorta: Connection Guide. HP Vertica Analytic Database

HP Integration with Incorta: Connection Guide. HP Vertica Analytic Database HP Integration with Incorta: Connection Guide HP Vertica Analytic Database HP Big Data Document Release Date: July, 2015 Legal Notices Warranty The only warranties for HP products and services are set

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) DMS Internals- Part X Lecture 21, April 7, 2015 Mohammad Hammoud Last Session: DMS Internals- Part IX Query Optimization Today Today s Session: DMS Internals- Part X Query

More information

Learn Well Technocraft

Learn Well Technocraft Note: We are authorized partner and conduct global certifications for Oracle and Microsoft. The syllabus is designed based on global certification standards. This syllabus prepares you for Oracle global

More information

CSE 444: Database Internals. Section 4: Query Optimizer

CSE 444: Database Internals. Section 4: Query Optimizer CSE 444: Database Internals Section 4: Query Optimizer Plan for Today Problem 1A, 1B: Estimating cost of a plan You try to compute the cost for 5 mins We will go over the solution together Problem 2: Sellinger

More information

CSE 344 MAY 7 TH EXAM REVIEW

CSE 344 MAY 7 TH EXAM REVIEW CSE 344 MAY 7 TH EXAM REVIEW EXAMINATION STATIONS Exam Wednesday 9:30-10:20 One sheet of notes, front and back Practice solutions out after class Good luck! EXAM LENGTH Production v. Verification Practice

More information

Relational Query Optimization. Highlights of System R Optimizer

Relational Query Optimization. Highlights of System R Optimizer Relational Query Optimization Chapter 15 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Highlights of System R Optimizer v Impact: Most widely used currently; works well for < 10 joins.

More information

Database Systems. Project 2

Database Systems. Project 2 Database Systems CSCE 608 Project 2 December 6, 2017 Xichao Chen chenxichao@tamu.edu 127002358 Ruosi Lin rlin225@tamu.edu 826009602 1 Project Description 1.1 Overview Our TinySQL project is implemented

More information

SQL QUERY EVALUATION. CS121: Relational Databases Fall 2017 Lecture 12

SQL QUERY EVALUATION. CS121: Relational Databases Fall 2017 Lecture 12 SQL QUERY EVALUATION CS121: Relational Databases Fall 2017 Lecture 12 Query Evaluation 2 Last time: Began looking at database implementation details How data is stored and accessed by the database Using

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

CS122 Lecture 10 Winter Term,

CS122 Lecture 10 Winter Term, CS122 Lecture 10 Winter Term, 2014-2015 2 Last Time: Plan Cos0ng Last time, introduced ways of approximating plan costs Number of rows each plan node produces Amount of disk IO the plan must perform Database

More information

2. Make an input file for Query Execution Steps for each Q1 and RQ respectively-- one step per line for simplicity.

2. Make an input file for Query Execution Steps for each Q1 and RQ respectively-- one step per line for simplicity. General Suggestion/Guide on Program (This is only for suggestion. You can change your own design as needed and you can assume your own for simplicity as long as it is reasonable to make it as assumption.)

More information

CS698F Advanced Data Management. Instructor: Medha Atre. Aug 11, 2017 CS698F Adv Data Mgmt 1

CS698F Advanced Data Management. Instructor: Medha Atre. Aug 11, 2017 CS698F Adv Data Mgmt 1 CS698F Advanced Data Management Instructor: Medha Atre Aug 11, 2017 CS698F Adv Data Mgmt 1 Recap Query optimization components. Relational algebra rules. How to rewrite queries with relational algebra

More information

6.830 Lecture 8 10/2/2017. Lab 2 -- Due Weds. Project meeting sign ups. Recap column stores & paper. Join Processing:

6.830 Lecture 8 10/2/2017. Lab 2 -- Due Weds. Project meeting sign ups. Recap column stores & paper. Join Processing: Lab 2 -- Due Weds. Project meeting sign ups 6.830 Lecture 8 10/2/2017 Recap column stores & paper Join Processing: S = {S} tuples, S pages R = {R} tuples, R pages R < S M pages of memory Types of joins

More information

After completing this course, participants will be able to:

After completing this course, participants will be able to: Querying SQL Server T h i s f i v e - d a y i n s t r u c t o r - l e d c o u r s e p r o v i d e s p a r t i c i p a n t s w i t h t h e t e c h n i c a l s k i l l s r e q u i r e d t o w r i t e b a

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

QUERY OPTIMIZATION [CH 15]

QUERY OPTIMIZATION [CH 15] Spring 2017 QUERY OPTIMIZATION [CH 15] 4/12/17 CS 564: Database Management Systems; (c) Jignesh M. Patel, 2013 1 Example SELECT distinct ename FROM Emp E, Dept D WHERE E.did = D.did and D.dname = Toy EMP

More information

CompSci 516: Database Systems. Lecture 20. Parallel DBMS. Instructor: Sudeepa Roy

CompSci 516: Database Systems. Lecture 20. Parallel DBMS. Instructor: Sudeepa Roy CompSci 516 Database Systems Lecture 20 Parallel DBMS Instructor: Sudeepa Roy Duke CS, Fall 2017 CompSci 516: Database Systems 1 Announcements HW3 due on Monday, Nov 20, 11:55 pm (in 2 weeks) See some

More information

CS 186, Fall 1999 Midterm 2 Professor Hawthorn

CS 186, Fall 1999 Midterm 2 Professor Hawthorn CS 186, Fall 1999 Midterm 2 Professor Hawthorn REFERENCE DATABASE. This is the Reference Database referred to in this exam. There are four tables. SALESPERSON contains the names, ids, regions & quotas

More information

20461: Querying Microsoft SQL Server

20461: Querying Microsoft SQL Server 20461: Querying Microsoft SQL Server Length: 5 days Audience: IT Professionals Level: 300 OVERVIEW This 5 day instructor led course provides students with the technical skills required to write basic Transact

More information

Duration Level Technology Delivery Method Training Credits. Classroom ILT 5 Days Intermediate SQL Server

Duration Level Technology Delivery Method Training Credits. Classroom ILT 5 Days Intermediate SQL Server NE-20761C Querying with Transact-SQL Summary Duration Level Technology Delivery Method Training Credits Classroom ILT 5 Days Intermediate SQL Virtual ILT On Demand SATV Introduction This course is designed

More information

Microsoft Querying Microsoft SQL Server 2014

Microsoft Querying Microsoft SQL Server 2014 1800 ULEARN (853 276) www.ddls.com.au Microsoft 20461 - Querying Microsoft SQL Server 2014 Length 5 days Price $4290.00 (inc GST) Version D Overview Please note: Microsoft have released a new course which

More information

Querying Microsoft SQL Server (MOC 20461C)

Querying Microsoft SQL Server (MOC 20461C) Querying Microsoft SQL Server 2012-2014 (MOC 20461C) Course 21461 40 Hours This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for

More information

Hash table example. B+ Tree Index by Example Recall binary trees from CSE 143! Clustered vs Unclustered. Example

Hash table example. B+ Tree Index by Example Recall binary trees from CSE 143! Clustered vs Unclustered. Example Student Introduction to Database Systems CSE 414 Hash table example Index Student_ID on Student.ID Data File Student 10 Tom Hanks 10 20 20 Amy Hanks ID fname lname 10 Tom Hanks 20 Amy Hanks Lecture 26:

More information

Course Outline. Querying Data with Transact-SQL Course 20761B: 5 days Instructor Led

Course Outline. Querying Data with Transact-SQL Course 20761B: 5 days Instructor Led Querying Data with Transact-SQL Course 20761B: 5 days Instructor Led About this course This course is designed to introduce students to Transact-SQL. It is designed in such a way that the first three days

More information

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 7 - Query optimization

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 7 - Query optimization CSE 544 Principles of Database Management Systems Alvin Cheung Fall 2015 Lecture 7 - Query optimization Announcements HW1 due tonight at 11:45pm HW2 will be due in two weeks You get to implement your own

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL 20761B; 5 Days; Instructor-led Course Description This course is designed to introduce students to Transact-SQL. It is designed in such a way that the first three days can

More information

Microsoft Querying Data with Transact-SQL - Performance Course

Microsoft Querying Data with Transact-SQL - Performance Course 1800 ULEARN (853 276) www.ddls.com.au Microsoft 20761 - Querying Data with Transact-SQL - Performance Course Length 4 days Price $4290.00 (inc GST) Version C Overview This course is designed to introduce

More information

T-SQL Training: T-SQL for SQL Server for Developers

T-SQL Training: T-SQL for SQL Server for Developers Duration: 3 days T-SQL Training Overview T-SQL for SQL Server for Developers training teaches developers all the Transact-SQL skills they need to develop queries and views, and manipulate data in a SQL

More information

Query Processing. Solutions to Practice Exercises Query:

Query Processing. Solutions to Practice Exercises Query: C H A P T E R 1 3 Query Processing Solutions to Practice Exercises 13.1 Query: Π T.branch name ((Π branch name, assets (ρ T (branch))) T.assets>S.assets (Π assets (σ (branch city = Brooklyn )(ρ S (branch)))))

More information

Principles of Data Management. Lecture #12 (Query Optimization I)

Principles of Data Management. Lecture #12 (Query Optimization I) Principles of Data Management Lecture #12 (Query Optimization I) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today s Notable News v B+ tree

More information

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: 20762C Developing SQL 2016 Databases Module 1: An Introduction to Database Development Introduction to the

More information

Introduction to Database Systems CSE 414. Lecture 26: More Indexes and Operator Costs

Introduction to Database Systems CSE 414. Lecture 26: More Indexes and Operator Costs Introduction to Database Systems CSE 414 Lecture 26: More Indexes and Operator Costs CSE 414 - Spring 2018 1 Student ID fname lname Hash table example 10 Tom Hanks Index Student_ID on Student.ID Data File

More information

System R Optimization (contd.)

System R Optimization (contd.) System R Optimization (contd.) Instructor: Sharma Chakravarthy sharma@cse.uta.edu The University of Texas @ Arlington Database Management Systems, S. Chakravarthy 1 Optimization Criteria number of page

More information

Query Optimization. Introduction to Databases CompSci 316 Fall 2018

Query Optimization. Introduction to Databases CompSci 316 Fall 2018 Query Optimization Introduction to Databases CompSci 316 Fall 2018 2 Announcements (Tue., Nov. 20) Homework #4 due next in 2½ weeks No class this Thu. (Thanksgiving break) No weekly progress update due

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Course Code: M20761 Vendor: Microsoft Course Overview Duration: 5 RRP: 2,177 Querying Data with Transact-SQL Overview This course is designed to introduce students to Transact-SQL. It is designed in such

More information

Final Exam Review 2. Kathleen Durant CS 3200 Northeastern University Lecture 23

Final Exam Review 2. Kathleen Durant CS 3200 Northeastern University Lecture 23 Final Exam Review 2 Kathleen Durant CS 3200 Northeastern University Lecture 23 QUERY EVALUATION PLAN Representation of a SQL Command SELECT {DISTINCT} FROM {WHERE

More information

Principles of Data Management

Principles of Data Management Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what

More information

Objectives. After completing this lesson, you should be able to do the following:

Objectives. After completing this lesson, you should be able to do the following: Objectives After completing this lesson, you should be able to do the following: Describe the types of problems that subqueries can solve Define subqueries List the types of subqueries Write single-row

More information

Querying Microsoft SQL Server

Querying Microsoft SQL Server Querying Microsoft SQL Server 20461D; 5 days, Instructor-led Course Description This 5-day instructor led course provides students with the technical skills required to write basic Transact SQL queries

More information

RELATIONAL OPERATORS #1

RELATIONAL OPERATORS #1 RELATIONAL OPERATORS #1 CS 564- Spring 2018 ACKs: Jeff Naughton, Jignesh Patel, AnHai Doan WHAT IS THIS LECTURE ABOUT? Algorithms for relational operators: select project 2 ARCHITECTURE OF A DBMS query

More information