extensions to multi query optimization

Post on 31-Dec-2015

16 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

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

Extensions to Extensions to Multi Query OptimizationMulti Query Optimization

Amit GuptaAmit GuptaIIT BombayIIT Bombay

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

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

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.

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.

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 =

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

MQO cont. MQO cont.

Advantage of Subset sum AlgorithmAdvantage of Subset sum Algorithm More Search spaceMore Search space can be changedcan be changed

Scheduling in MQOScheduling in MQO

nodes to be

cached

Plan DAG

top related