06c - Query Optimizer Query Processing and Optimization...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Query Processing and Optimization (III) (Lecture for CSE671: Intro. to DB Systems II) Feb. 4, 2008 Hui Fang Department of Computer Science and Engineering The Ohio State University Query Optimizer SQL query Select logical query plan Logical query plan tree Select physical query plan Physical query plan tree Logical v.s. Physical Operators • Logical operators what they do – e.g., union, selection, project, join, grouping • Physical operators how they do it – e.g., nested loop join, sort-merge join, hash join, index join Query Optimizer (Example) Select logical query plan Select physical query plan Select b,d From S, R Where S.c = R.c AND R.a=“f” AND S.e=2 Π b,d σ R.a=“f” S.e=2 R.c=S.c x R S Π b,d σ R.a = “f” σ S.e = 2 R S Π b,d σ R.a = “f” σ S.e = 2 R S scan Index-based search Nested-loop join What we have discussed • Physical operators for – Sorting – Join – Selection Today’s Lecture • Query Optimization
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Query Optimization • The goal is not to find an optimal strategy. • Instead the goal is to find a reasonably
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

06c - Query Optimizer Query Processing and Optimization...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online