Docstoc

Randomized Algorithms

Document Sample
Randomized Algorithms Powered By Docstoc
					Randomized Algorithms for Optimizing Large Join Queries
                               Yannis E. Ioannidis and Younkyung Cha Kang

        In this paper, the two authors describe and analyze the use of randomization in algorithms that
search for the most efficient optimization of QEPs. In doing so, these authors provide a good analysis of
what a good optimizing algorithm would be, following the form:

        Two-Phase Optimization (2PO)

procedure lI() (
mmS = S,,
while not (stoppmng~condt~on) do (
S = random state,
while not (foc~~mmunum(S)) do (
S’ = random state m neighbors(S),
if cost(S) c cost(S) then S = S’
}
if cost(S) c cost(mmS) then mmS = S,
}
retum(mmS),
}
procedure SA() (
s = so,
T=To,
mmS=S,
while not wozen) do (
while not (equhbruun) do (
S’ = random state m neighbors(S).
AC = cost@‘) - cost(S),
if (AC < 0) then S = S’,
if (AC > 0) then S = S’ with probability e-Ac’T,
if cost(S) c cost(mmS) then mmS = S,
}
T = reduce(T),
}
retum(mmS).
}

While this algorithm may seem like it would be useful for our project, we are not exactly optimizing a
large set of possible QEPs at once. Instead, we are going to calculate the best of a selected 4 or 5
queries, and display the optimal query to the end-user. So, we will likely use a variant of the Iterative
Improvement algorithm (II) that is the first “phase” of the Two-Phase Optimization algorithm.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:10/26/2011
language:English
pages:1