1. A method for generating an execution plan for a query in a relational database system, comprising: generating one or more initial logical representations of the query; performing a bounded exploration process around each of the one or more initial logical representations of the query, the performing of the exploration process around a particular initial logical representation of the query comprising applying transformation rules to generate one or more additional logical representations of the query that are logically equivalent to the particular initial logical representation of the query and that are within a maximum allowable transformation distance of the particular initial logical representation of the query, wherein each logical representation of the query comprises a plurality of operators and wherein generating the one or more additional logical representations of the query that are logically equivalent to the particular initial logical representation of the query comprises: assigning a search distance to each operator of a first logical representation of a query; applying a transformation rule to a pattern of operators within the plurality of operators of the first logical representation of the query to generate a second logical representation of the query in response to determining that (i) the pattern of operators matches a pattern associated with the applied transformation rule and (i) the search distance assigned to each operator in the pattern of operators, and that is a numerical value, is less than the maximum allowable transformation distance, the maximum allowable transformation distance being a numerical value that bounds a number of the transformation rules that can be applied to generate each one of the one or more additional logical representations of the query so that the number of transformation rules that is applied to generate each one of the one or more additional logical representations of the query is less than a total number of the transformation rules that can be applied; generating one or more execution plans for each initial logical representation of the query and each additional logical representation of the query and associating a cost with each of the generated execution plans; and selecting an execution plan having a lowest cost from among the generated execution plans.
1. A method for generating an execution plan for a query in a relational database system, comprising: generating one or more initial logical representations of the query; performing a bounded exploration process around each of the one or more initial logical representations of the query, the performing of the exploration process around a particular initial logical representation of the query comprising applying transformation rules to generate one or more additional logical representations of the query that are logically equivalent to the particular initial logical representation of the query and that are within a maximum allowable transformation distance of the particular initial logical representation of the query, wherein each logical representation of the query comprises a plurality of operators and wherein generating the one or more additional logical representations of the query that are logically equivalent to the particular initial logical representation of the query comprises: assigning a search distance to each operator of a first logical representation of a query; applying a transformation rule to a pattern of operators within the plurality of operators of the first logical representation of the query to generate a second logical representation of the query in response to determining that (i) the pattern of operators matches a pattern associated with the applied transformation rule and (i) the search distance assigned to each operator in the pattern of operators, and that is a numerical value, is less than the maximum allowable transformation distance, the maximum allowable transformation distance being a numerical value that bounds a number of the transformation rules that can be applied to generate each one of the one or more additional logical representations of the query so that the number of transformation rules that is applied to generate each one of the one or more additional logical representations of the query is less than a total number of the transformation rules that can be applied; generating one or more execution plans for each initial logical representation of the query and each additional logical representation of the query and associating a cost with each of the generated execution plans; and selecting an execution plan having a lowest cost from among the generated execution plans. 2. The method of claim 1 wherein generating the one or more initial logical representations of the query comprises generating one or more initial logical operator trees; and wherein generating the one or more additional logical representations of the query comprises generating one or more additional logical operator trees.