h ow the envs and qres stacks work (example)
DESCRIPTION
H ow the ENVS and QRES stacks work (example). 3rd Country Conference, February 2007. by Prof. Kazimierz Subieta subieta@pjwstk. edu .pl http://www.ipipan.waw.pl/~subieta SBA/SBQL pages: http://www.sbql.pl. Query addressing a tiny database. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: H ow the ENVS and QRES stacks work (example)](https://reader036.vdocuments.net/reader036/viewer/2022072013/56812bc7550346895d9012db/html5/thumbnails/1.jpg)
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
![Page 2: H ow the ENVS and QRES stacks work (example)](https://reader036.vdocuments.net/reader036/viewer/2022072013/56812bc7550346895d9012db/html5/thumbnails/2.jpg)
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} }
![Page 3: H ow the ENVS and QRES stacks work (example)](https://reader036.vdocuments.net/reader036/viewer/2022072013/56812bc7550346895d9012db/html5/thumbnails/3.jpg)
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
![Page 4: H ow the ENVS and QRES stacks work (example)](https://reader036.vdocuments.net/reader036/viewer/2022072013/56812bc7550346895d9012db/html5/thumbnails/4.jpg)
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
![Page 5: H ow the ENVS and QRES stacks work (example)](https://reader036.vdocuments.net/reader036/viewer/2022072013/56812bc7550346895d9012db/html5/thumbnails/5.jpg)
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.