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

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: zxo102 ouyang <zxo102(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to speed up the first-time-searching in pgsql?
Date: 2009-05-27 01:24:03
Message-ID: alpine.GSO.2.01.0905262118290.7909@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-05-27 01:43:01 Re: How to speed up the first-time-searching in pgsql?
Previous Message Scott Marlowe 2009-05-27 01:04:50 Re: How to speed up the first-time-searching in pgsql?