11. The method of claim 1 , wherein the first result set of the first query does not overlap with a second result set of the second query.
1. A method of processing a plurality of queries, comprising: determining, at a database driver, whether a first query and a second query are similar, the first query being sent from a first execution thread executing in an application server, wherein the first and second queries are similar if the first and second queries include a set of common database tables from which to select data; and in response to a determination that the first and second queries are similar: determining a distinct set of conditions included in a conditions clause in the first and second queries; generating, at the database driver, a union query based on the first and second queries, wherein the union query includes the set of common database tables and each condition of the distinct set of conditions; submitting the union query to a database that stores the set of common database tables from which data is selected based on the first and second queries; receiving a combined result set of the union query from the database; submitting the first query against the combined result set; and receiving, at the database driver, a first result set of the first query in response to submitting the first query against the combined result set.