













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth exploration of query execution and plan optimization in advanced database systems. Topics covered include query parsing, rewriting, logical and physical plan generation, operator plumbing, materialization vs pipelining, and various join algorithms. The document also includes examples and exercises to help students understand the concepts.
Typology: Slides
1 / 21
This page cannot be seen from the preview
Don't miss anything!














parse
Query rewriting
Physical plan generation
execute result
SQL query
parse tree
statistics logical query plan
physical query plan
Disk(s)
Applications
Parser
Query Optimizer
Query Executor
Storage Manager
Logical query plan
Physical query plan
Access method API calls
Storage system API calls File system API calls
πB,D
σR.A = “c”
Natural join
Best logical plan
Index scan (^) Table scan
Hash join
Project
Materialized here
Each operator supports:
Open() { /** initialize child */ Child.Open(); }
GetNext() { LOOP: t = Child.GetNext(); IF (t == EOT) { /** no more tuples */ RETURN EOT; } ELSE IF (t.A == “c”) RETURN t; ENDLOOP: }
Close() { /** inform child */ Child.Close(); }
Iterator for Nested Loop Join
Lexp Rexp
TableScan
TableScan
TableScan
Question: What is the sequence of getNext() calls?