Download - Extensions to Multi Query Optimization
![Page 1: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/1.jpg)
Extensions to Extensions to Multi Query OptimizationMulti Query Optimization
Amit GuptaAmit GuptaIIT BombayIIT Bombay
![Page 2: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/2.jpg)
Recap of MQORecap of MQO
AND-OR DAG of the set of QueriesAND-OR DAG of the set of Queries Transformation Transformation Greedy AlgorithmGreedy Algorithm
– Choose highest Choose highest benefit benefit shared node shared node to be cachedto be cached
![Page 3: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/3.jpg)
MQO for Fixed Cache SizeMQO for Fixed Cache Size
Greedy heuristic Greedy heuristic – Choose shared node with highest Choose shared node with highest benefit/Size benefit/Size to to
be cached be cached Disadvantage of Greedy Disadvantage of Greedy
– less search spaceless search space
![Page 4: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/4.jpg)
Problem Definition Problem Definition
Given set of shared nodes Given set of shared nodes S S = ( s= ( s, , ss,..) and cache size ,..) and cache size C..
Choose subset Choose subset P P from from SS, such that , such that size(p) <= size(p) <= C C , where , where p p PP
benefit of caching benefit of caching P P is maximized. is maximized.
![Page 5: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/5.jpg)
Subset sum ProblemSubset sum Problem
Given set Given set S S = ( s= ( s, s, s,..) and C, ,..) and C, choose the subset P from S such that choose the subset P from S such that
p <= C , where p p <= C , where p P and P and p is maximized.p is maximized.
![Page 6: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/6.jpg)
Subset sum AlgorithmSubset sum Algorithm
Given set Given set S S = ( s= ( s, s, s,..),..) Exponential Algorithm Exponential Algorithm
– Search Space: Power set of Search Space: Power set of S.S.
Approximation AlgoApproximation Algo– Given Given as error constant as error constant – Search Space: Trimmed Power Set of Search Space: Trimmed Power Set of
S.S.– Approximation Ratio = Approximation Ratio =
![Page 7: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/7.jpg)
MQO for fixed Size CacheMQO for fixed Size Cache
Given Given – S S = { set of shared nodes}= { set of shared nodes}– C C = Cache Size= Cache Size– Error constant Error constant
Search Space of trimmed Power set of Search Space of trimmed Power set of S.S.– Trimming procedure Trimming procedure
![Page 8: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/8.jpg)
MQO cont. MQO cont.
Advantage of Subset sum AlgorithmAdvantage of Subset sum Algorithm More Search spaceMore Search space can be changedcan be changed
![Page 9: Extensions to Multi Query Optimization](https://reader035.vdocuments.mx/reader035/viewer/2022071807/56812f90550346895d950ead/html5/thumbnails/9.jpg)
Scheduling in MQOScheduling in MQO
nodes to be
cached
Plan DAG