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

From Ron Mayer
Subject Re: Per-table random_page_cost for tables that we know are always cached
Date
Msg-id 48100BB0.1010704@cheapcomplexdevices.com
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
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.



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Bruce Momjian
Date:
Subject: Re: Proposed patch - psql wraps at window width