18. The computer of claim 17 , wherein the instructions further comprise: if the first query plan that implements the first query is found in the unexpected affinity and the unexpected affinity equals the candidate affinity, incrementing the candidate affinity hit count and incrementing the candidate total count for the first query; if the first query plan that implements the first query is found in the unexpected affinity and the unexpected affinity does not equal the candidate affinity, incrementing the candidate total count for the first query but not incrementing the candidate affinity hit count for the first query; moving the query plans in the expected affinity that have been accessed more recently than a first threshold time to a third address range within the first address range of the expected affinity; and moving the query plans in the expected affinity that have accessed less recently than a second threshold time to a fourth address range within the first address range of the expected affinity, wherein the third address range and the fourth address range are non-overlapping within the first address range.
18. The computer of claim 17 , wherein the instructions further comprise: if the first query plan that implements the first query is found in the unexpected affinity and the unexpected affinity equals the candidate affinity, incrementing the candidate affinity hit count and incrementing the candidate total count for the first query; if the first query plan that implements the first query is found in the unexpected affinity and the unexpected affinity does not equal the candidate affinity, incrementing the candidate total count for the first query but not incrementing the candidate affinity hit count for the first query; moving the query plans in the expected affinity that have been accessed more recently than a first threshold time to a third address range within the first address range of the expected affinity; and moving the query plans in the expected affinity that have accessed less recently than a second threshold time to a fourth address range within the first address range of the expected affinity, wherein the third address range and the fourth address range are non-overlapping within the first address range. 19. The computer of claim 18 , wherein the calculating the hit percentage of the expected affinity for the first query further comprises: dividing the expected affinity hit count by the expected affinity total count.