X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 0641030F291 for ; Wed, 18 Jun 2003 00:12:31 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 15096-01 for ; Tue, 17 Jun 2003 21:12:20 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 338BA30F277 for ; Tue, 17 Jun 2003 21:12:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h5I0CIU6017951; Tue, 17 Jun 2003 20:12:18 -0400 (EDT) To: Ernest E Vogelsinger Cc: nikolaus@dilger.cc, pgsql-performance@postgresql.org, pgsql-general@postgresql.org Subject: Re: [PERFORM] Interesting incosistent query timing In-reply-to: <5.1.1.6.2.20030618005902.02e31a38@mail.vogelsinger.at> References: <5.1.1.6.2.20030618005902.02e31a38@mail.vogelsinger.at> Comments: In-reply-to Ernest E Vogelsinger message dated "Wed, 18 Jun 2003 01:01:09 +0200" Date: Tue, 17 Jun 2003 20:12:18 -0400 Message-ID: <17950.1055895138@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200306/1083 X-Sequence-Number: 44013 Ernest E Vogelsinger writes: > I came to the same conclusion - I installed a cron script that performs a > select against that index on a regular basis (3 minutes). After that even > the most complex queries against this huge table go like whoosssshhh ;-) > Would be interesting what one could do to _not_ have to take this basically > clumsy approach... Seems like your kernel is falling down on the job: if those files are the most heavily used ones on the machine, it should be keeping them in disk cache without such prompting. If they are not all that heavily used, then you are basically slowing everything else down in order to speed up these queries (because you're starving everything else for disk cache). Which may be a reasonable tradeoff in your situation, but be aware of what you're doing. The best compromise may be to buy more RAM ;-) regards, tom lane