PPT Slide
Path expressions are logically equivalent to subqueries
References and Path Expressions (cont.)
select E.name, E.dept->name, E.dept->mgr->name
where E.dept->headcount > 10;
- Actual approach: shared subquery generation (QGM)
- Compute common paths (prefixes) once to save work
- Not every SQL context accepts an actual subquery
- Also need to handle non-serializable locking levels
- Efficiency obtained through query rewrite, e.g.:
- Subquery to outer-join transformation
- Outer-join to join transformation where possible