发明授权
- 专利标题: Histogram synthesis modeler for a database query optimizer
- 专利标题(中): 用于数据库查询优化器的直方图综合建模器
-
申请号: US09162245申请日: 1998-09-28
-
公开(公告)号: US06263345B1公开(公告)日: 2001-07-17
- 发明人: Christopher M. Farrar , Harry A. Leslie , Pedro Celis , Diana L. Shak
- 申请人: Christopher M. Farrar , Harry A. Leslie , Pedro Celis , Diana L. Shak
- 主分类号: G06F1730
- IPC分类号: G06F1730
摘要:
The invention provides a mechanism for using statistics, in connection with various database query cost modeling techniques, to more accurately estimate the number of rows and UECs that will be produced by relational operators and predicates in database systems. The ability to accurately estimate the number of rows and UECs returned by a relational operator and/or a predicate is fundamental to computing the cost of a query execution plan. This, in turn, drives the optimizer's ability to select the query plan best suited for the desired performance goal. According to the present invention, histogram statistics are synthesized bottom up from the leaf nodes to the root node of a query tree. Given input statistics in the form of histograms for each operand of a relational operator or predicate, the present inventive method and apparatus merge the input statistics in a way that it simulates the effects of the run time operator on the actual data, so as to produce a predicted row count and UEC for each histogram interval representative of the data that actually will be produced by each such operator or predicate in the query tree. A database query optimizer may use these statistics to select and implement an optimal query plan.
信息查询