50 likes | 171 Views
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.
E N D
How 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 • Query: For each department get its reference and the average sal of its employees. • SBQL: Deptjoinavg(employs.Emp.sal) • Tiny database: • Expected result: bag{ struct{i17, 2500}, struct{i22, 1450} }
Execution scenario Deptjoin avg( ( employs . Emp ) . sal ) 1stemploys 1stEmp 1stDept 2ndemploys 2ndEmp 2ndDept 3rdemploys 3rdEmp avg join 1st dot 2nd dot
Sample query Deptjoinavg((employs.Emp). sal) Start Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22) empty ENVS QRES
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.