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

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: "Decibel!" <decibel(at)decibel(dot)org>
Cc: PFC <lists(at)peufeu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Per-table random_page_cost for tables that we know are always cached
Date: 2008-04-24 04:25:20
Message-ID: 48100BB0.1010704@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Decibel! wrote:
> we can just look at
> the hit rate for the object. But we'd also need stats for how often we
> find pages for a relation in the OS cache, which no one has come up with
> a good method for.

Makes me wonder if we could (optionally, I guess, since timing
stuff is apparently slow on some systems) also keep save the
average time it took for a block to get ready in pg_statio_all_tables.
Or, (if possible), save the averages for random and sequential pages
separately.

Then rather than using guessed values in the config files it seems
the plans could use the actual averages per table.

That would address both poor guesses on random_page_cost,
effective_cache_size, etc - as well as get things right
on systems where some tablespaces are fast and some are slow.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-04-24 04:34:46 Re: Proposed patch - psql wraps at window width
Previous Message Gregory Stark 2008-04-24 03:27:23 Re: Proposed patch - psql wraps at window width