X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AD4343A4583 for ; Wed, 3 Nov 2004 19:50:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 68146-10 for ; Wed, 3 Nov 2004 19:50:01 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id 24E963A45ED for ; Wed, 3 Nov 2004 19:50:00 +0000 (GMT) Received: (qmail 21922 invoked from network); 3 Nov 2004 20:50:05 +0100 Received: from unknown (HELO musicbox) (boutiquenumerique-lists@192.168.0.2) by boutiquenumerique.com with SMTP; 3 Nov 2004 20:50:05 +0100 Date: Wed, 03 Nov 2004 20:50:04 +0100 To: pgsql-performance@postgresql.org Subject: Re: preloading indexes References: <004b01c4c1ce$cd969c80$8300a8c0@solent> <20041103191247.GFZT27576.fed1rmmtao07.cox.net@CYGNUS> <20041103193528.GB16528@phlogiston.dyndns.org> From: =?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?= Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <20041103193528.GB16528@phlogiston.dyndns.org> User-Agent: Opera M2/7.54 (Linux, build 751) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/23 X-Sequence-Number: 8977 -- uh, you can always load a table in cache by doing a seq scan on it... like select count(1) from table or something... this doesn't work for indexes of course, but you can always look in the system catalogs, find the filename for the index, then just open() it from an external program and read it without caring for the data... it'll save you the seeks in the index... of course you'll have problems with file permissions etc, not mentioning security, locking, etc, etc, etc, is that worth the trouble ? On Wed, 3 Nov 2004 14:35:28 -0500, Andrew Sullivan wrote: > On Wed, Nov 03, 2004 at 12:12:43PM -0700, stuff@opensourceonline.com > wrote: >> That's correct - I'd like to be able to keep particular indexes in RAM >> available all the time > > If these are queries that run frequently, then the relevant cache > will probably remain populated[1]. If they _don't_ run frequently, why > do you want to force the memory to be used to optimise something that > is uncommon? But in any case, there's no mechanism to do this. > > A > > [1] there are in fact limits on the caching: if your data set is > larger than memory, for instance, there's no way it will all stay > cached. Also, VACUUM does nasty things to the cache. It is hoped > that nastiness is fixed in 8.0. >