ZStream: A Cost-based Query Processor for Adaptively Detecting Composite Events Presented by Rabia Nuray-Turan and Xiaozhi Yu.

Slides:



Advertisements
Similar presentations
Overview of Query Evaluation (contd.) Chapter 12 Ramakrishnan and Gehrke (Sections )
Advertisements

EXECUTION PLANS By Nimesh Shah, Amit Bhawnani. Outline  What is execution plan  How are execution plans created  How to get an execution plan  Graphical.
Database Management Systems, R. Ramakrishnan and Johannes Gehrke1 Evaluation of Relational Operations: Other Techniques Chapter 12, Part B.
1 Relational Query Optimization Module 5, Lecture 2.
1 Distributed Databases CS347 Lecture 14 May 30, 2001.
©Silberschatz, Korth and Sudarshan13.1Database System Concepts Chapter 13: Query Processing Overview Measures of Query Cost Selection Operation Sorting.
Query Processing (overview)
1 NiagaraCQ: A Scalable Continuous Query System for Internet Databases CS561 Presentation Xiaoning Wang.
QUERY OPTIMIZATION AND QUERY PROCESSING.
Database System Concepts 5 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 14: Query Optimization.
Query Optimization. General Overview Relational model - SQL  Formal & commercial query languages Functional Dependencies Normalization Physical Design.
16.5 Introduction to Cost- based plan selection Amith KC Student Id: 109.
Copyright ©2009 Opher Etzion Event Processing Course Filtering and transformation (Relates to Chapter 8)
1 Evaluation of Relational Operations: Other Techniques Chapter 12, Part B.
Chapter 19 Query Processing and Optimization
©Silberschatz, Korth and Sudarshan14.1Database System Concepts 3 rd Edition Chapter 14: Query Optimization Overview Catalog Information for Cost Estimation.
1 Optimization. 2 Why Optimize? Given a query of size n and a database of size m, how big can the output of applying the query to the database be? Example:
Query Processing Presented by Aung S. Win.
Relational Database Performance CSCI 6442 Copyright 2013, David C. Roberts, all rights reserved.
Context Tailoring the DBMS –To support particular applications Beyond alphanumerical data Beyond retrieve + process –To support particular hardware New.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Query Evaluation Chapter 12: Overview.
Access Path Selection in a Relational Database Management System Selinger et al.
COMP 5138 Relational Database Management Systems Semester 2, 2007 Lecture 12 Query Processing and Optimization.
Database Management 9. course. Execution of queries.
©Silberschatz, Korth and Sudarshan13.1Database System Concepts Chapter 13: Query Processing Overview Measures of Query Cost Selection Operation Sorting.
CMSC424: Database Design Instructor: Amol Deshpande
Chapter 13 Query Processing Melissa Jamili CS 157B November 11, 2004.
Department of Computer Science and Engineering, HKUST Slide Query Processing and Optimization Query Processing and Optimization.
Query Optimization Arash Izadpanah. Introduction: What is Query Optimization? Query optimization is the process of selecting the most efficient query-evaluation.
Query Optimization Chap. 19. Evaluation of SQL Conceptual order of evaluation – Cartesian product of all tables in from clause – Rows not satisfying where.
Lecture 4 - Query Optimization Advanced Databases Masood Niazi Torshiz Islamic Azad university- Mashhad Branch
Order Statistics. Order statistics Given an input of n values and an integer i, we wish to find the i’th largest value. There are i-1 elements smaller.
Query Processing. Steps in Query Processing Validate and translate the query –Good syntax. –All referenced relations exist. –Translate the SQL to relational.
Status “Lifetime of a Query” –Query Rewrite –Query Optimization –Query Execution Optimization –Use cost-estimation to iterate over all possible plans,
CPSC 404, Laks V.S. Lakshmanan1 Evaluation of Relational Operations: Other Operations Chapter 14 Ramakrishnan & Gehrke (Sections ; )
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan Chapter 13: Query Processing.
Data Structure Introduction.
Chapter 12 Query Processing. Query Processing n Selection Operation n Sorting n Join Operation n Other Operations n Evaluation of Expressions 2.
Introduction to Query Optimization, R. Ramakrishnan and J. Gehrke 1 Introduction to Query Optimization Chapter 13.
CS4432: Database Systems II Query Processing- Part 2.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Introduction to Query Optimization Chapter 13.
Query Processing – Query Trees. Evaluation of SQL Conceptual order of evaluation – Cartesian product of all tables in from clause – Rows not satisfying.
Pyretic Programming.
CSCI 5708: Query Processing II Pusheng Zhang University of Minnesota Feb 5, 2004.
Query Processing CS 405G Introduction to Database Systems.
Lecture 3 - Query Processing (continued) Advanced Databases Masood Niazi Torshiz Islamic Azad university- Mashhad Branch
More Optimization Exercises. Block Nested Loops Join Suppose there are B buffer pages Cost: M + ceil (M/(B-2))*N where –M is the number of pages of R.
Query Processing – Implementing Set Operations and Joins Chap. 19.
Relational Operator Evaluation. overview Projection Two steps –Remove unwanted attributes –Eliminate any duplicate tuples The expensive part is removing.
1 Holistic Twig Joins: Optimal XML Pattern Matching Nicolas Bruno, Nick Koudas, Divesh Srivastava ACM SIGMOD 2002 Presented by Jun-Ki Min.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Query Processing and Query Optimization Database System Implementation CSE 507 Some slides adapted from Silberschatz, Korth and Sudarshan Database System.
1 Overview of Query Evaluation Chapter Outline  Query Optimization Overview  Algorithm for Relational Operations.
Chapter 13: Query Processing
Query Processing COMP3017 Advanced Databases Nicholas Gibbins
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Query Processing and Query Optimization Database System Implementation CSE 507 Slides adapted from Silberschatz, Korth and Sudarshan Database System Concepts.
Chapter 14: Query Optimization
Query Optimization Heuristic Optimization
Database System Implementation CSE 507
CS222P: Principles of Data Management Lecture #15 Query Optimization (System-R) Instructor: Chen Li.
Chapter 12: Query Processing
Introduction to Query Optimization
Overview of Query Optimization
Chapter 15 QUERY EXECUTION.
Overview of Query Evaluation
Query Functions.
CS222P: Principles of Data Management Notes #13 Set operations, Aggregation, Query Plans Instructor: Chen Li.
B-Trees and Sorting Zachary G. Ives April 12, 2019
CS222: Principles of Data Management Lecture #15 Query Optimization (System-R) Instructor: Chen Li.
Presentation transcript:

ZStream: A Cost-based Query Processor for Adaptively Detecting Composite Events Presented by Rabia Nuray-Turan and Xiaozhi Yu

What is ZStream  It is a composite event processing system(CEP).  It uses tree based query plans for both the logical and physical representation of query patterns.  It is able to unify the evaluation of sequence, conjunction, disjunction, negation, and Kleene closure as variants of the join operator.  It is able to capture the actual runtime behavior of a plan, and chooses the optimal plan.

Language Specification  Example: Stock market monitoring query Pattern T1;T2;T3 WHERE T1.name = T3.name; AND T2.name = ‘Google’ AND T1.price > (1+x%)*T2.price AND T3.price < (1-y%)* T2.price WITHIN 10 secs RETURN T1, T2, T3 Event Operators : Sequence------A;B Disjunction----A|B Negation------!A Conjunction ----A&B

Tree-Based Plans

Operator Evaluation  Sequence Operator Has two operands: first and second event class in the sequential pattern Right buffer is the main iteration to make sure the output is sorted in end time order Any event in right/left buffer with start time less than EAT is discarded Only valid events in right buffer are compared against the events in left buffer  Negation Operator Must be combined with other operators Pushed down in the tree to avoid unnecessary intermediate results Finds time intervals when non-negation events can produce only valid results Searches for negation events that can negate non-negation event instance

Operator Evaluation  Conjunction Similar to sequence operator, but do not distinguish between the right and left buffers Works like a sort-merge join It maintains two cursors to both input buffers Finds the earlier not-yet-matched event in one buffer and merges with the earlier events in the other buffer satisfying the constra ints  Disjunction Input is directly added to the output buffer if it satisfies both time and value constraints Merging is done according to their end time  Kleene Closure Trinary operator, with start and end closure Kleene closure looks for matches in the midle buffer If the count is not specified, maximum number of middle buffer events are found If not, a window of specified size is applied

Optimal Query Plan  Rule Based Transformations Smaller number of operators If the number of operators same, plan with the lower cost operators will be selected  Hashing for equality Predicates For sequence A;B where A.f = B.f, built hashtable on A For conjunction built hash tables for A and B Reduces the search cost for equality predicates  Optimal Reordering Dynamic Programming based Finds the optimal subtrees to find the optimal physical plan  Plan Adaptation Recompute the physical query plan on the fly based on the collected statistics. Change the plan without any damage to the expected output.

Performance Evaluation Query 7: Negate Pattern “IBM;!SUN;ORACLE” Pattern IBM;!SUN;ORACLE WITHIN 200 Units