Issues in Indexing Multi-dimensional indexing:

Slides:



Advertisements
Similar presentations
CS 540 Database Management Systems
Advertisements

Evaluation of Relational Operators CS634 Lecture 11, Mar Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Lecture 13: Query Execution. Where are we? File organizations: sorted, hashed, heaps. Indexes: hash index, B+-tree Indexes can be clustered or not. Data.
Query Optimization Goal: Declarative SQL query
Query Execution Professor: Dr T.Y. Lin Prepared by, Mudra Patel Class id: 113.
Query Execution Professor: Dr T.Y. Lin Prepared by, Mudra Patel Class id: 113.
Recap of Feb 27: Disk-Block Access and Buffer Management Major concepts in Disk-Block Access covered: –Disk-arm Scheduling –Non-volatile write buffers.
1 Lecture 22: Query Execution Wednesday, March 2, 2005.
Query Execution Professor: Dr T.Y. Lin Prepared by, Mudra Patel Class id: 113.
CS186 Final Review Query Optimization.
Query Execution Chapter 15 Section 15.1 Presented by Khadke, Suvarna CS 257 (Section II) Id
1 Relational Operators. 2 Outline Logical/physical operators Cost parameters and sorting One-pass algorithms Nested-loop joins Two-pass algorithms.
Database Systems Chapter 1 The Worlds of Database Systems.
Overview of Implementing Relational Operators and Query Evaluation
Lecture 11: DMBS Internals
Database Management 9. course. Execution of queries.
Lecture #19 May 13 th, Agenda Trip Report End of constraints: triggers. Systems aspects of SQL – read chapter 8 in the book. Going under the lid!
Query Execution Section 15.1 Shweta Athalye CS257: Database Systems ID: 118 Section 1.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Overview of Implementing Relational Operators and Query Evaluation Chapter 12.
CSE 544: Relational Operators, Sorting Wednesday, 5/12/2004.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
Indexing and Execution May 20 th, Indexing - Recap Primary file organization: heap, sorted, hashed. Primary vs. secondary Clustered vs. unclustered.
CSCI 4333 Database Design and Implementation – Exercise (5) Xiang Lian The University of Texas – Pan American Edinburg, TX
DBMS Internals How does it all work? May 3rd, 2004.
Lecture 17: Query Execution Tuesday, February 28, 2001.
Query Execution. Where are we? File organizations: sorted, hashed, heaps. Indexes: hash index, B+-tree Indexes can be clustered or not. Data can be stored.
CS 440 Database Management Systems Lecture 5: Query Processing 1.
Hash Tables and Query Execution March 1st, Hash Tables Secondary storage hash tables are much like main memory ones Recall basics: –There are n.
CS 540 Database Management Systems
Query Execution Query compiler Execution engine Index/record mgr. Buffer manager Storage manager storage User/ Application Query update Query execution.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
DMBS Architecture May 15 th, Generic Architecture Query compiler/optimizer Execution engine Index/record mgr. Buffer manager Storage manager storage.
Tallahassee, Florida, 2016 COP5725 Advanced Database Systems Query Processing Spring 2016.
CS4432: Database Systems II Query Processing- Part 1 1.
What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently and safely. Provide.
Query Execution Chapter 15 Section 15.1 Presented by Khadke, Suvarna CS 257 (Section II) Id
Storage Access Paging Buffer Replacement Page Replacement
15.1 – Introduction to physical-Query-plan operators
CS 540 Database Management Systems
CS 440 Database Management Systems
Database Management System
Lecture 16: Data Storage Wednesday, November 6, 2006.
Running Example – Airline
Prepared by : Ankit Patel (226)
Introduction to Query Optimization
Evaluation of Relational Operations
CPSC-608 Database Systems
Lecture 11: DMBS Internals
Chapter 15 QUERY EXECUTION.
Query Execution Presented by Khadke, Suvarna CS 257
Introduction lecture1.
Introduction to Database Systems
Examples of Physical Query Plan Alternatives
1.1 The Evolution of Database Systems
Database Query Execution
CS179G, Project In Computer Science
CSCI 4333 Database Design and Implementation – Exercise (5)
What Should a DBMS Do? How will we do all this??
Storage and Indexing May 17th, 2002.
Query Execution Presented by Jiten Oswal CS 257 Chapter 15
Relational Algebra Friday, 11/14/2003.
Lecture 13: Query Execution
Relational Query Optimization
Lecture 23: Query Execution
Query Optimization.
Lecture 22: Query Execution
Lecture 18: DMBS Overview and Data Storage
Completing the Physical-Query-Plan and Chapter 16 Summary ( )
Lecture 20: Query Execution
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Presentation transcript:

Issues in Indexing Multi-dimensional indexing: how do we index regions in space? Document collections? Multi-dimensional sales data How do we support nearest neighbor queries? Indexing is still a hot and unsolved problem!

Indexing Exercise #1 The Purchase table: date, buyer, seller, store, product Reports are generated once a day. What’s the best file-organization/indexing strategy?

Indexing Exercise #2 Airline database: Reservations table -- flight#, seat#, date#, occupied, customer-id

Indexing Exercise #3 Web log application: load all the logs every night into a database. Generate reports every day (for curious professors).

Query Execution Query User/ update Application Query compiler plan Execution engine Record, index requests Index/record mgr. Page commands Buffer manager Read/write pages Storage manager storage

Query Execution Plans Query Plan: logical tree SELECT S.sname FROM Purchase P, Person Q WHERE P.buyer=Q.name AND Q.city=‘seattle’ AND Q.phone > ‘5430000’ buyer  City=‘seattle’ phone>’5430000’ Query Plan: logical tree implementation choice at every node scheduling of operations. Buyer=name (Simple Nested Loops) Purchase Person (Table scan) (Index scan) Some operators are from relational algebra, and others (e.g., scan, group) are not.

Scans Table scan: iterate through the records of the relation. Index scan: go to the index, from there get the records in the file (when would this be better?) Sorted scan: produce the relation in order. Implementation depends on relation size.

Putting them all together The iterator model. Each operation is implemented by 3 functions: Open: sets up the data structures and performs initializations GetNext: returns the the next tuple of the result. Close: ends the operations. Cleans up the data structures. Enables pipelining! Contrast with data-driven materialize model. Sometimes it’s the same (e.g., sorted scan).