extensions to multi query optimization

9
Extensions to Extensions to Multi Query Multi Query Optimization Optimization Amit Gupta Amit Gupta IIT Bombay IIT Bombay

Upload: hector-andrews

Post on 31-Dec-2015

16 views

Category:

Documents


1 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Extensions to  Multi Query Optimization

Extensions to Extensions to Multi Query OptimizationMulti Query Optimization

Amit GuptaAmit GuptaIIT BombayIIT Bombay

Page 2: Extensions to  Multi Query Optimization

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

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

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

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

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

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

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

Scheduling in MQOScheduling in MQO

nodes to be

cached

Plan DAG