> > The optimizer could then use a different (much lower) value of > > random_page_cost for tables for which "cache priority" is set > > highest since it would know. > > "cache priority" to me sounds like we're trying to influence caching > behavior, which isn't what's happening. I do agree that we need a > better way to tell the planner what tables are in memory.
I think overruling the cache manager to more aggressively cache certain objects is a bad idea in general. e.g. the above telling the planner can easily produce self fulfilling prophecies. Instead, if we find situations where the cache is not optimally used we should try to improve the cache algorithm. A per tablespace random_page_cost might make more sense, as Tom already said. e.g. Informix had a command to lock a table into memory, but apparently it was so often misused, that the feature has been removed again, and replaced by a better caching algorithm. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers