3. The method of claim 2 , further comprising: if a first query plan that implements the first query is found in the expected affinity, incrementing an expected affinity hit count for the first query and incrementing an expected affinity total count for the first query; if the first query plan that implements the first query is found in an unexpected affinity, incrementing the expected affinity total count for the first query; and if the first query plan that implements the first query is not found in the expected affinity and is not found in the unexpected affinity, creating the first query plan in the expected affinity, initializing the expected affinity hit count for the first query to one and initializing the expected affinity total count for the first query to one.
2. The method of claim 1 , further comprising: calculating an expected affinity for the first query, in response to receiving the first query.