10. The method of claim 9 wherein generating candidate query plans includes: generating at least one logical query plans according to the received query; and generating a plurality of physical query plans according to the logical query plan, wherein the selected query plan corresponds to one of the plurality of physical query plans.
10. The method of claim 9 wherein generating candidate query plans includes: generating at least one logical query plans according to the received query; and generating a plurality of physical query plans according to the logical query plan, wherein the selected query plan corresponds to one of the plurality of physical query plans. 11. The method of claim 10 wherein generating a plurality of physical query plans comprises generating a tree representation, wherein nodes of the tree representation correspond to operations, the method further comprising traversing the nodes of the tree representation and executing the corresponding operations.