1. A computer-implemented method of optimizing database query execution; comprising: receiving a query configured to be executed against a database containing data, wherein the query has been previously executed against the database, and wherein statistics reflecting a number of records required to execute the query were recorded during a prior execution of the query; prior to executing the query, analyzing the query to select a locking strategy to use in executing the query, the locking strategy being selected from at least two different locking strategies, wherein the locking strategy specifies which of the data to prevent other queries from accessing when the query is executed, wherein the analyzing comprises determining whether to escalate from a row level locking strategy to a page level locking strategy by evaluating: the number of records evaluated during execution of the query during the prior execution of the query, and an estimated number of records required to execute the query; upon determining at least one of the number of records and the estimated number of records exceeds a specified threshold, escalating to at least the page level locking strategy; upon determining that neither the number of records nor the estimated number of records exceeds the specified threshold, selecting the row level locking strategy; and executing the query using the selected locking strategy.