Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9B4129FA111; Sat, 23 Dec 2006 15:49:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 04203-04; Sat, 23 Dec 2006 15:49:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 4A8B19FA0BA; Sat, 23 Dec 2006 15:49:03 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from spunkymail-a12.dreamhost.com (sd-green-bigip-202.dreamhost.com [208.97.132.202]) by svr4.postgresql.org (Postfix) with ESMTP id AB0315AF896; Sat, 23 Dec 2006 19:49:02 +0000 (GMT) Received: from [192.168.1.238] (adsl-75-31-110-76.dsl.irvnca.sbcglobal.net [75.31.110.76]) by spunkymail-a12.dreamhost.com (Postfix) with ESMTP id AF40C7FA5; Sat, 23 Dec 2006 11:49:01 -0800 (PST) Message-ID: <458D8828.70807@araisoft.com> Date: Sat, 23 Dec 2006 11:48:56 -0800 From: Benjamin Arai User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Jeff Frost Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: Problem with large table not using indexes (I think) References: <458D82D0.5050903@araisoft.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.229 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200612/304 X-Sequence-Number: 24096 I thought that you only need to use the -z flag if the distribution of the data is changing. Jeff Frost wrote: > On Sat, 23 Dec 2006, Benjamin Arai wrote: > >> The largest table in my database (30GB) has mysteriously went from >> taking milli-seconds to perform a query to minutes. This disks are >> fine and I have a 4GB shared_memory. Could this slow down have to do >> with the fsm_max_pages or something else like that? I made it larger >> but the queries still taking a long time. I do daily vacuum's but I >> don't run it with -z or --full. I would like to avoid doing a --full >> if possible because it would literally take over a week to complete. >> Any help would be greatly appreciated. > > Benjamin, > > When is the last time you ran ANALYZE? That's what the -z option > does. If you're only vacuuming once daily, you should definitely > analyze with the -z flag as well. >