Re: Per-table random_page_cost for tables that we know are always cached

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas OSB SD
Тема Re: Per-table random_page_cost for tables that we know are always cached
Дата
Msg-id E1539E0ED7043848906A8FF995BDA57902F915F6@m0143.s-mxs.net
обсуждение исходный текст
Ответ на Re: Per-table random_page_cost for tables that we know are always cached  (Decibel! <decibel@decibel.org>)
Список 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 по дате отправления:

Предыдущее
От: PFC
Дата:
Сообщение: Re: Per-table random_page_cost for tables that we know are always cached
Следующее
От: "Zeugswetter Andreas OSB SD"
Дата:
Сообщение: Re: WIP: psql default banner patch