摘要 |
<p>A system and method for optimizing (402) a database query with improved performance enhancements is herein disclosed. The database query consists of one or more logical expressions (304). Through the repeated application of one or more rules (335), the logical expressions (304) are transformed into physical expressions (306) and in some cases, execution plans that implement the database query. Each expression (311) has associated with it a set of group attributes that specifies its characteristic inputs and outputs and a cost (346) that estimates the computational expense for executing the expression. The group attributes are used to categorize similar expressions into groups that are stored in a search data structure. They are also used to track duplicate expressions. The cost associated with an expression is used to guide the search process to consider those expressions that will produce low cost plans.</p> |