X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2BB649DC87F for ; Thu, 9 Feb 2006 18:43:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 50947-07 for ; Thu, 9 Feb 2006 18:43:32 -0400 (AST) X-Greylist: delayed 07:32:52.349909 by SQLgrey- Received: from pat.uio.no (pat.uio.no [129.240.130.16]) by postgresql.org (Postfix) with ESMTP id 690749DC84A for ; Thu, 9 Feb 2006 18:43:22 -0400 (AST) Received: from mail-mx2.uio.no ([129.240.10.30]) by pat.uio.no with esmtp (Exim 4.43) id 1F7KVT-00014m-IC; Thu, 09 Feb 2006 23:43:19 +0100 Received: from ti200710a080-12451.bb.online.no ([85.164.176.163] helo=[10.1.1.101]) by mail-mx2.uio.no with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.43) id 1F7KVO-00020F-Uw; Thu, 09 Feb 2006 23:43:15 +0100 Subject: Re: Help with optimizing a sql statement From: Rafael Martinez To: "Jim C. Nasby" Cc: Dave Dutcher , pgsql-performance@postgresql.org In-Reply-To: <20060209194603.GX57845@pervasive.com> References: <20060209193345.GV57845@pervasive.com> <001f01c62db1$3a380910$8300a8c0@tridecap.com> <20060209194603.GX57845@pervasive.com> Content-Type: text/plain Organization: University of Oslo Date: Thu, 09 Feb 2006 23:44:42 +0100 Message-Id: <1139525082.19758.6.camel@linux.site> Mime-Version: 1.0 X-Mailer: Evolution 2.4.0 Content-Transfer-Encoding: 7bit X-UiO-Spam-info: not spam, SpamAssassin (score=-3.844, required 12, autolearn=disabled, AWL 1.16, UIO_MAIL_IS_INTERNAL -5.00) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200602/88 X-Sequence-Number: 17074 On Thu, 2006-02-09 at 13:46 -0600, Jim C. Nasby wrote: > I looked at the estimates for the table access methods and they all > looked ok, so I think the statistics are pretty up-to-date; there just > aren't enough of them for the planner to do a good job. > VACUUM ANALYZE runs 4 times every hour, so yes, statistics are up-to-date. I will increase default_statistics_target tomorrow at work and see what happens. Thanks for your help. -- Rafael Martinez, Center for Information Technology Services University of Oslo, Norway PGP Public Key: http://folk.uio.no/rafael/