Method and system for histogram determination in a database

The present invention relates to the field of computer systems. More particularly, the invention relates to a method and system for database optimization. A method and system for determining when to collect, save, and/or utilize histograms is disclosed. A mechanism for automatically deciding when to...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: Mozes, Ari W
Format: Patent
Sprache:eng
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The present invention relates to the field of computer systems. More particularly, the invention relates to a method and system for database optimization. A method and system for determining when to collect, save, and/or utilize histograms is disclosed. A mechanism for automatically deciding when to collect histograms upon request from the user is provided. The histogram collection decision is based on the columns the user is interested in, the role these columns play in the queries as submitted to the system, and the underlying distribution for these columns, e.g., as seen in a random sample. The user specifies which columns are of interest, and the database is configured to collect column usage information that describes how each column is being used in the workload. This column usage information could be stored in memory and periodically flushed to disk. Given a set of potential columns, the distribution of those columns is viewed in combination with the usage information to determine which columns should have histograms.