Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id AC30B133740B for ; Fri, 4 Feb 2011 11:03:56 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 65277-03 for ; Fri, 4 Feb 2011 15:03:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.peak6.com (smtp.peak6.com [38.98.137.6]) by mail.postgresql.org (Postfix) with ESMTP id 82A281337B8D for ; Fri, 4 Feb 2011 11:03:49 -0400 (AST) X-AuditID: 0a64cb1e-b7c55ae000000bfb-4c-4d4c1556e5ef Message-ID: <4D4C1555.40209@peak6.com> Date: Fri, 4 Feb 2011 09:03:49 -0600 From: Shaun Thomas Reply-To: sthomas@peak6.com Organization: Peak6 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: Greg Smith CC: felix , "pgsql-performance@postgresql.org" Subject: Re: Really really slow select count(*) References: <4D4C138C.7010304@2ndquadrant.com> In-Reply-To: <4D4C138C.7010304@2ndquadrant.com> Content-Type: text/plain; charset="UTF-8"; format=flowed content-transfer-encoding: 7bit X-Brightmail-Tracker: AAAAAQAAAZE= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/192 X-Sequence-Number: 42330 On 02/04/2011 08:56 AM, Greg Smith wrote: > PostgreSQL version? If you're running on 8.3 or earlier, I would be > suspicous that your Free Space Map has been overrun. That's my first inclination. If he says autovacuum is running, there's no way it should be bloating the table that much. Felix, If you're running a version before 8.4, what is your max_fsm_pages setting? If it's too low, autovacuum won't save you, and your tables will continue to grow daily unless you vacuum full regularly, and I wouldn't recommend that to my worst enemy. ;) -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604 312-676-8870 sthomas@peak6.com ______________________________________________ See http://www.peak6.com/email_disclaimer.php for terms and conditions related to this email