Cornell University
Library
Cornell UniversityLibrary

eCommons

Help
Log In(current)
  1. Home
  2. Cornell Computing and Information Science
  3. Computer Science
  4. Computer Science Technical Reports
  5. A Better Tool for Query Optimization

A Better Tool for Query Optimization

File(s)
85-671.pdf (1.18 MB)
85-671.ps (305.72 KB)
Permanent Link(s)
https://hdl.handle.net/1813/6511
Collections
Computer Science Technical Reports
Author
Bitton, Dina
Vander Zanden, Bradley T.
Abstract

When evaluating the performance of a query strategy, one must often estimate the number of distinct values of an attribute in a randomly selected subset of a relation. Most query optimizers compute this estimate based on the assumption that prior to the selection, the attribute values are uniformly distributed in the relation. In this paper we depart from this assumption and instead consider Zipf distributions that are known to accurately model text and name distributions. Given a relation of cardinality $n$ where a non-key attribute $A$ has a Zipf distribution, we derive both an exact formula and an approximate non-iterative formula for the expected number of distinct $A$-values contained in a sample of $k$ randomly selected tuples. The approximation is accurate, and it is very easy to compute. Thus it provides a practical tool to deal with non-uniform distributions in query optimization.

Date Issued
1985-04
Publisher
Cornell University
Keywords
computer science
•
technical report
Previously Published as
http://techreports.library.cornell.edu:8081/Dienst/UI/1.0/Display/cul.cs/TR85-671
Type
technical report

Site Statistics | Help

About eCommons | Policies | Terms of use | Contact Us

copyright © 2002-2026 Cornell University Library | Privacy | Web Accessibility Assistance