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

From: "Zeugswetter Andreas OSB SD" <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>
To: "Decibel!" <decibel(at)decibel(dot)org>, "PFC" <lists(at)peufeu(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Per-table random_page_cost for tables that we know are always cached
Date: 2008-04-23 13:47:59
Message-ID: E1539E0ED7043848906A8FF995BDA57902F915F6@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas OSB SD 2008-04-23 13:56:12 Re: WIP: psql default banner patch
Previous Message PFC 2008-04-23 13:11:05 Re: Per-table random_page_cost for tables that we know are always cached