1. A method of performing a database query, the method comprising: generating an access plan for the database query, the access plan using at least one resource capable of being retrieved into working memory, wherein the resource is selected from the group consisting of a database file, a database table, an index, a temporary result set, a temporary file, and a hash table; estimating a percentage of the resource that is currently resident in working memory; estimating a cost for the access plan using the estimated percentage; and selectively executing the access plan based upon the estimated cost.