Re: Per-table random_page_cost for tables that we know are always cached - Mailing list pgsql-hackers

From Zeugswetter Andreas OSB SD
Subject Re: Per-table random_page_cost for tables that we know are always cached
Date
Msg-id E1539E0ED7043848906A8FF995BDA57902F915F6@m0143.s-mxs.net
Whole thread Raw
In response to Re: Per-table random_page_cost for tables that we know are always cached  (Decibel! <decibel@decibel.org>)
List pgsql-hackers
> > 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


pgsql-hackers by date:

Previous
From: PFC
Date:
Subject: Re: Per-table random_page_cost for tables that we know are always cached
Next
From: "Zeugswetter Andreas OSB SD"
Date:
Subject: Re: WIP: psql default banner patch