1. A computer-implemented method, comprising: monitoring access to at least a data object stored in a database; determining a memory residency priority for keeping the data object pinned in memory, based on the monitored access to the data object; and determining, by operation of one or more computer processors, an access plan for a query accessing the data object, based on the memory residency priority for keeping the data object pinned in memory.