X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 153519FA19B for ; Thu, 11 May 2006 15:47:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 52934-06 for ; Thu, 11 May 2006 15:47:02 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web50304.mail.yahoo.com (web50304.mail.yahoo.com [206.190.38.58]) by postgresql.org (Postfix) with SMTP id E6D899FA278 for ; Thu, 11 May 2006 15:47:00 -0300 (ADT) Received: (qmail 61498 invoked by uid 60001); 11 May 2006 18:46:59 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=0s2EU8CtXiamwCsFqG6YCM0jSH/tm7pWi3shQhvBY7PcyTRANIQnkf3e7jzkZBd/hL/mz09TequO4lO8ATNveMG7RQDvZ2o1IVMT3sdqa+sJXQJKkM5gAvrwFx3MJAg73TGiQG05MRLwLo4tu63iXvkWletBaFH+oR2TLpvJ+4g= ; Message-ID: <20060511184659.61496.qmail@web50304.mail.yahoo.com> Date: Thu, 11 May 2006 11:46:59 -0700 (PDT) From: Subject: Re: Help with a seq scan on multi-million row table To: pgsql-sql@postgresql.org In-Reply-To: <20060511171808.GB9089@phlogiston.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.371 tagged_above=0 required=5 tests=AWL, BAYES_00, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_WHOIS, FORGED_YAHOO_RCVD, NO_REAL_NAME X-Spam-Level: * X-Archive-Number: 200605/103 X-Sequence-Number: 25134 Hello Andrew, Markus, and Tom - thanks for all the help! You've just helped a large Simpy community! :) I'll try to post some performance charts to http://blog.simpy.com/ shortly. In short, this immediately dropped the load from 2-3-4-5-6-7+ to circa 0.25. Thanks! Otis ----- Original Message ---- From: Andrew Sullivan To: pgsql-sql@postgresql.org Sent: Thursday, May 11, 2006 1:18:08 PM Subject: Re: [SQL] Help with a seq scan on multi-million row table On Thu, May 11, 2006 at 10:09:44AM -0700, ogjunk-pgjedan@yahoo.com wrote: > Hi Markus & Tom, > > Higher statistics for this column.... hm, I'd love to try changing > it to see how that changes things, but I'm afraid I don't know how > to do that. How can I change the statistics target value for this > column? > > Ah, I think I found the place: No. Just ALTER TABLE [name] ALTER [column] SET STATISTICS. See http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html for more. You'll need to ANALYSE afterwards. A -- Andrew Sullivan | ajs@crankycanuck.ca