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 D9EE55E470C for ; Tue, 31 Aug 2004 16:43:02 -0300 (ADT) 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 36450-09 for ; Tue, 31 Aug 2004 19:42:56 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.197]) by svr1.postgresql.org (Postfix) with ESMTP id 94E885E46CD for ; Tue, 31 Aug 2004 16:42:55 -0300 (ADT) Received: by mproxy.gmail.com with SMTP id 74so175917rnk for ; Tue, 31 Aug 2004 12:42:56 -0700 (PDT) Received: by 10.38.6.75 with SMTP id 75mr1627076rnf; Tue, 31 Aug 2004 12:42:56 -0700 (PDT) Received: by 10.38.86.41 with HTTP; Tue, 31 Aug 2004 12:42:56 -0700 (PDT) Message-ID: <4b09a0c04083112425776ec8c@mail.gmail.com> Date: Tue, 31 Aug 2004 21:42:56 +0200 From: Jean-Max Reymond Reply-To: Jean-Max Reymond To: Gary Doades Subject: Re: Optimizing a request Cc: pgsql-performance@postgresql.org In-Reply-To: <4134DDDD.428.4AF67CC@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <4134DDDD.428.4AF67CC@localhost> 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: 200408/481 X-Sequence-Number: 8117 ----- Original Message ----- From: Gary Doades Date: Tue, 31 Aug 2004 20:21:49 +0100 Subject: Re: [PERFORM] Optimizing a request To: pgsql-performance@postgresql.org > Have you run ANALYZE on this database after creating the indexes or loading the data? the indexes are created and the data loaded and then, I run vacuum analyze. >What percentage of rows in the "article" table are likely to match the keys selected from the "rubrique" table? only 1 record. If it is likely to fetch a high proportion of the rows from article then it may be best that a seq scan is performed. What are your non-default postgresql.conf settings? It may be better to increase the default_statistics_target (to say 100 to 200) before running ANALYZE and then re-run the query. yes, default_statistics_target is set to the default_value. I have just increased shared_buffers and effective_cache_size to give advantage of 1 Mb RAM -- Jean-Max Reymond CKR Solutions http://www.ckr-solutions.com