H ow the ENVS and QRES stacks work (example)
-
Upload
imelda-byers -
Category
Documents
-
view
30 -
download
2
description
Transcript of H ow the ENVS and QRES stacks work (example)
K.Subieta. How the stacks work, Slide 1 3rd Country Conference, Feb.2007
How the ENVS and QRES stacks work (example)
byProf. Kazimierz Subieta
[email protected]://www.ipipan.waw.pl/~subieta
SBA/SBQL pages: http://www.sbql.pl
3rd Country Conference, February 2007
K.Subieta. How the stacks work, Slide 2 3rd Country Conference, Feb.2007
Query addressing a tiny database
• Query: For each department get its reference and the average sal of its employees.
• SBQL: Dept join avg(employs.Emp.sal)
• Tiny database:
• Expected result: bag{ struct{i17, 2500}, struct{i22, 1450} }
K.Subieta. How the stacks work, Slide 3 3rd Country Conference, Feb.2007
Execution scenarioDept join avg( ( employs . Emp ) . sal )
join 1st dot 2nd dot avg
1st Dept
2nd Dept
1st employs
2nd employs
1st Emp
2nd Emp
3rd Emp3rd employs
K.Subieta. How the stacks work, Slide 4 3rd Country Conference, Feb.2007
Sample queryDept join avg( ( employs . Emp ) . sal )
Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22)
ENVS QRES
empty
Start
K.Subieta. How the stacks work, Slide 5 3rd Country Conference, Feb.2007
In closing …
• Please note that this evaluation scenario concerns the formal semantics only, executed by an abstract machine.– Our goal is clear, universal and free of ambiguities semantic
specification rather than performance.
• In real implementation there are many obvious optimizations.– C.f. our implementations in various projects.
• The evaluation process is also the subject of many sophisticated optimizations (rewriting, indices, caching,…) .
• The entire process is executed in main memory, hence the computations are not critical.– Critical computations concern the access to external storage and
network, and avoiding unnecessary (redundant) computations.
– This is just the subject of major SBA optimization methods.