From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Scott Ribe" <scott_ribe(at)killerbytes(dot)com> |
Cc: | "Reg Me Please" <regmeplease(at)gmail(dot)com>, "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [PGSQL 8.3.5] Use of a partial indexes |
Date: | 2008-12-29 16:07:43 |
Message-ID: | dcc563d10812290807r1f0ce09ewf2bfc6ba03a7cf09@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Dec 29, 2008 at 8:36 AM, Scott Ribe <scott_ribe(at)killerbytes(dot)com> wrote:
> Creating the partial index reads rows, and the pages are left in the disk
> cache. The only way to do proper comparisons is to reboot between trials in
> order to compare queries with cold caches, or use the latter of multiple
> runs in order to compare queries with hot caches.
There are two other ways, one is to unmount and remount the partition
on which pgsql is running. On many db servers this is possible
because pgsql gets its own disk array / mount point. The other is to
use drop caches:
smarlowe(at)abasin:/home/smarlowe$ cd /proc/sys/vm
smarlowe(at)abasin:/proc/sys/vm$ free
total used free shared buffers cached
Mem: 4016300 2257688 1758612 0 152060 1106400
-/+ buffers/cache: 999228 3017072
Swap: 1068280 45712 1022568
smarlowe(at)abasin:/proc/sys/vm$ echo 1|sudo tee drop_caches
1
smarlowe(at)abasin:/proc/sys/vm$ free
total used free shared buffers cached
Mem: 4016300 1046788 2969512 0 188 94628
-/+ buffers/cache: 951972 3064328
Swap: 1068280 45712 1022568
voila! cache dumped.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Ribe | 2008-12-29 16:28:34 | Re: [PGSQL 8.3.5] Use of a partial indexes |
Previous Message | Scott Ribe | 2008-12-29 15:36:49 | Re: [PGSQL 8.3.5] Use of a partial indexes |