1. A method comprising: compressing a query plan to data in a cache at a high compression level if a runtime of a query that the query plan implements is greater than a high time threshold; compressing the query plan to the data in the cache at a medium compression level if the runtime of the query that the query plan implements is less than the high time threshold and greater than a low time threshold, wherein the high time threshold is greater than the low time threshold, and wherein the high compression level is greater than the medium compression level; and storing the query plan to the data in the cache at an uncompressed level if the runtime of the query that the query plan implements is less than the low time threshold.