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 an 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; generating one or more execution plans for each initial logical representation of the query and each additional logical representation of the query; and selecting an execution plan from among the generated execution plans.