Re: How to speed up the first-time-searching in pgsql? - Mailing list pgsql-general

From Scott Marlowe
Subject Re: How to speed up the first-time-searching in pgsql?
Date
Msg-id dcc563d10905261848y540b6276g94f803eca75bc60d@mail.gmail.com
Whole thread Raw
In response to Re: How to speed up the first-time-searching in pgsql?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How to speed up the first-time-searching in pgsql?  (zxo102 ouyang <zxo102@gmail.com>)
List pgsql-general
On Tue, May 26, 2009 at 7:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Greg Smith <gsmith@gregsmith.com> writes:
>> On Tue, 26 May 2009, Scott Marlowe wrote:
>>> Also, in the morning, have a cron job crank up that does "select * from
>>> mybigtable" for each big table to load it into cache.
>
>> Just to clarify:  on 8.3 and later versions, doing this doesn't do what
>> some people expect.  Sequential scans like that will continuously re-use a
>> 256KB section of the PostgreSQL shared_buffers space, so this won't cause
>> all of that to get paged back in if the problem is related to it being
>> swapped out.  It will pass everything through the OS buffer cache though
>> and prime it usefully, which might be all that's actually needed.
>
> Bearing in mind that this is a Windows server ... I seem to recall that
> the conventional wisdom is still to keep shared_buffers relatively small
> on Windows.  So priming the OS cache is exactly what it's about.
> (Keeping that down should also help avoid the other scenario Scott was
> worried about, where shared memory itself gets paged out.)

Yeah, I thought it was pretty obvious I was talking OS cache up there.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to speed up the first-time-searching in pgsql?
Next
From: Nick
Date:
Subject: Regular expression and array