Re: Tsearch2 Initial Search Speed - Mailing list pgsql-performance

From Matthew Wakeling
Subject Re: Tsearch2 Initial Search Speed
Date
Msg-id Pine.LNX.4.64.0806171702010.3987@aragorn.flymine.org
Whole thread Raw
In response to Re: Tsearch2 Initial Search Speed  (Alan Hodgson <ahodgson@simkin.ca>)
List pgsql-performance
On Tue, 17 Jun 2008, Alan Hodgson wrote:
> On Tuesday 17 June 2008, Howard Cole <howardnews@selestial.com> wrote:
>> Incidentally, how can I clear the cache in between queries?
>
> Stop PostgreSQL, unmount the filesystem it's on, remount it, restart
> PostgreSQL. Works under Linux.
>
> If it's on a filesystem you can't unmount hot, you'll need to reboot.

Not true - on recent Linux kernels, you can drop the OS cache by running

echo "1" >/proc/sys/vm/drop_caches

as root. You'll still need to restart Postgres to drop its cache too.

Matthew

--
Richards' Laws of Data Security:
 1. Don't buy a computer.
 2. If you must buy a computer, don't turn it on.

pgsql-performance by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: Tsearch2 Initial Search Speed
Next
From: "Scott Marlowe"
Date:
Subject: Re: Which hardware ?