An apparatus, program product and method utilize the retrieval status of a
resource to generate an access plan for a database query that uses the
resource. The retrieval status, which indicates, for example, what
percentage of a given resource is already stored in working memory, and
thus need not be separately retrieved during query execution, may be used
to generate more accurate input/output cost estimates for access plans,
and thus enable a query optimizer to better select an access plan that is
optimal under given runtime conditions.