1. A computer implemented method for optimizing a query, comprising: generating a subplan; predicting one or more properties of an algorithm available for optimizing the subplan; selecting an algorithm from a plurality of algorithms available for optimizing the subplan; and generating an optimized access plan using the selected algorithm.