Re: Script to compute random page cost - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Script to compute random page cost
Date
Msg-id 200209101528.g8AFSOW14990@candle.pha.pa.us
Whole thread Raw
In response to Re: Script to compute random page cost  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-hackers
Oliver Elphick wrote:
> Available memory (512M) exceeds the total database size, so sequential
> and random are almost the same for the second and subsequent runs.
>  
> Since, in production, I would hope to have all active tables permanently
> in RAM, would there be a case for my using a page cost of 1 on the
> assumption that no disk reads would be needed?

Yes, in your case random_page_cost would be 1 once the data gets into
RAM.

In fact, that is the reason I used only /data/base for testing so places
where data can load into ram will see lower random pages costs.

I could just create a random file and test on that but it isn't the
same.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Script to compute random page cost
Next
From: Sean Chittenden
Date:
Subject: Re: Optimization levels when compiling PostgreSQL...