
Synopsis Data Structures for Massive Data Sets
Phillip B. Gibbons
Yossi Matias
y
1Introduction
A growing number of applications demand algorithms
and data structures that enable the ecient processing
of data sets with gigabytes to terabytes to petabytes
of data. Such massive data sets necessarily reside on
disks or tapes, making even a few accesses of the base
data set comparably slow (e.g., a single disk access is
often 10
000 times slower than a single memory access).
This short note (see 8] for the full paper) considers
data structures for supporting queries to massive data
sets, while minimizing or avoiding disk accesses. In
particular, weadvocate and study the use of small space
data structures.
We denote as
synopsis data structures
any data
structures that are substantively smaller than their base
data sets. A synopsis data structure has the following
advantages over a non-synopsis (e.g., linear space) data
structure: (a) it may reside in main memory, enabling
query responses and data structure updates that avoid
disk accesses altogether, (b) it can be transmitted
remotely at minimal cost, (c) it has minimal impact
on the overall storage costs of a system, (d) it leaves
space in the memory for other processing (available
main memory is a precious resource for external memory
algorithms), and (e) it can serve as a small surrogate for
data sets that are currently expensive or impossible to
access. Hence a traditional viewpoint in the algorithms
literature | that a linear space data structure is a
good one | is not appropriate for massive data sets,
as such data structures often fail to provide satisfactory
application p erformance.
On the other hand, since synopsis data structures
are too small to maintainafullcharacterization of their
base data sets, they must summarize the data set, and
the responses they provide to queries will typically be
approximate ones. The challenges are to determine (1)
Information Sciences Research Center, Bell Lab oratories,
600 Mountain Avenue, Murray Hill, NJ 07974. Email:
gibbons@research.bell-labs.com.
y
Department of Computer Science, Tel-Aviv University,Tel-
Aviv 69978 Israel, and Information Sciences Research Center, Bell
in part byanAlonFellowship, by the Israel Science Foundation
founded by The Academy of Sciences and Humanities, and bythe
Israeli Ministry of Science.
what synopsis of the full data set to keep in the limited
space in order to maximize the accuracy and condence
of its approximate responses, and (2) how to eciently
compute the synopsis and maintain it in the presence of
updates to the data set.
Due to their importance in applications, there are
a number of synopsis data structures in the literature
and in existing systems. Examples include uniform and
biased random samples, various types of histograms,
statistical summary information such as frequency mo-
ments, data structures resulting from lossy compression
of the data set, etc. Often, synopsis data structures
are used in aheuristic way, with no formal properties
proved on their performance or accuracy, especially un-
der the presence of updates to the data set. Our ongoing
work since 1995 seeks to provide a systematic study of
synopsis data structures, focusing on p erformance and
accuracy guarantees, even in the presence of data up-
dates.
2 Results
In the full paper, we describe a context for algorithmic
work relevant to massive data sets and a framework for
evaluating such work. In brief, we combine the PDM
external memory mo del 15] with input/output conven-
tions more typical for the study of (online) data struc-
ture problems. Two general scenarios are considered:
one where the input resides on the disks of the PDM
and one where the input arrives online in the PDM
memory. We describe some of our w
ork on synopsis
data structures, and highlight results on three problem
domains from the database literature: hot list queries,
histograms and quantiles, and frequency moments.
Hot list queries.
A
hot list
is an ordered set of
h
value, count
i
pairs for the most frequently occurring
\values" in a data set. Hot lists are used in a variety
of data analysis contexts, including fraud detection,
best sellers lists, market basket analysis, selectivity
estimation in query optimization, load balancing in
parallel query optimization, etc. Note that hot lists
are trivial to maintain given sucient space to hold
afull histogram of the data set how
ever, for many
data sets, the histogram would not b e a synopsis data
structure. Weshow in 1] that there are no synopsis data
structures for estimating even the count of the most
1