90 likes | 175 Views
Extensions to Multi Query Optimization. Amit Gupta IIT Bombay. Recap of MQO. AND-OR DAG of the set of Queries Transformation Greedy Algorithm Choose highest benefit shared node to be cached. MQO for Fixed Cache Size. Greedy heuristic
E N D
Extensions to Multi Query Optimization Amit Gupta IIT Bombay
Recap of MQO • AND-OR DAG of the set of Queries • Transformation • Greedy Algorithm • Choose highest benefit shared node to be cached
MQO for Fixed Cache Size • Greedy heuristic • Choose shared node with highest benefit/Size to be cached • Disadvantage of Greedy • less search space
Problem Definition • Given set of shared nodes S = ( s, s,..) and cache size C. • Choose subset P from S, such that • size(p) <= C , where p P • benefit of caching P is maximized.
Subset sum Problem • Given set S = ( s, s,..) and C, • choose the subset P from S such that • p <= C , where p P and • p is maximized.
Subset sum Algorithm • Given set S = ( s, s,..) • Exponential Algorithm • Search Space: Power set of S. • Approximation Algo • Given as error constant • Search Space: Trimmed Power Set of S. • Approximation Ratio =
MQO for fixed Size Cache • Given • S = { set of shared nodes} • C = Cache Size • Error constant • Search Space of trimmed Power set of S. • Trimming procedure
MQO cont. • Advantage of Subset sum Algorithm • More Search space • can be changed
Scheduling in MQO nodes to be cached Plan DAG