Tracking join and self-join sizes in limited storage

Noga Alon, Phillip B. Gibbons, Yossi Matias, Mario Szegedy

Research output: Contribution to conferencePaperpeer-review

110 Scopus citations

Abstract

Query optimizers rely on fast, high-quality estimates of result sizes in order to select between various join plans. Self-join sizes of relations provide bounds on the join size of any pairs of such relations. It also indicates the degree of skew in the data, and has been advocated for several estimation procedures. Exact computation of the self-join size requires storage proportional to the number of distinct attribute values, which may be prohibitively large. In this paper, we study algorithms for tracking (approximate) self-join sizes in limited storage in the presence of insertions and deletions to the relations. Such algorithms detect changes in the degree of skew without an expensive recomputation from the base data. We show that an algorithm based on a tug-of-war approach provides a more accurate estimation than one based on a sample-and-count approach which is in turn more accurate than a sampling-only approach. Next, we study algorithms for tracking (approximate) join sizes in limited storage; the goal is to maintain a small signature of each relation such that join sizes can be accurately estimated between any pairs of relations. We show that taking random samples for join signatures can lead to inaccurate estimation unless the sample size is quite large; moreover, by a lower bound we show, no other signature scheme can significantly improve upon sampling without further assumptions. These negative results are shown to hold even in the presence of sanity bounds. On the other hand, we present a join signature scheme based on tug-of-war signatures that provides guarantees on join size estimation as a function of the self-join sizes of the joining relations; this scheme can significantly improve upon the sampling scheme.

Original languageEnglish (US)
Pages10-20
Number of pages11
DOIs
StatePublished - 1999
EventProceedings of the 1999 18th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS '99 - Philadelphia, PA, USA
Duration: May 31 1999Jun 2 1999

Other

OtherProceedings of the 1999 18th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS '99
CityPhiladelphia, PA, USA
Period5/31/996/2/99

All Science Journal Classification (ASJC) codes

  • Software
  • Information Systems
  • Hardware and Architecture

Fingerprint Dive into the research topics of 'Tracking join and self-join sizes in limited storage'. Together they form a unique fingerprint.

Cite this