Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 97CD49F9A87 for ; Thu, 20 Sep 2007 18:25:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 48780-07 for ; Thu, 20 Sep 2007 18:25:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id 938669F9AC3 for ; Thu, 20 Sep 2007 18:25:21 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id j3so494405ugf for ; Thu, 20 Sep 2007 14:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=2vPso/rzbwysu4oZt/mNF0uwWlpLKJfuPQ8eEh5ekBM=; b=USnixpjKYbi6sVIJAybI3Jql13X4Wksp0JHOb1nq3xmiIz45Evj2cxwaH147lt6Z5RXGQCx67Hj8ftYZGqzxx1ZwWXgOL9K5ZMbA9oYvC1/Vu7///ep9q6bdXwAQQYchwzhEX+32DwTU8wRfSSxMcineuNxM4B4lNN4W5IS4Jho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cSIHsPEyeuGF5ch2N3y/18b1Srh5u53pjOsKBfgktkYmK9yq06MzSlDqaqDc+d6gQz2EFf/nipIirkagHcUrh9n1SRWPUKyfBDGklyGYrYOCphGoRX2Rr4vzKeApAhCI16DzwdMWxLQnAwdNENWDjNiMmOTxqkMRI6TJnhWvmbM= Received: by 10.67.105.10 with SMTP id h10mr1939493ugm.1190323519947; Thu, 20 Sep 2007 14:25:19 -0700 (PDT) Received: by 10.66.220.7 with HTTP; Thu, 20 Sep 2007 14:25:19 -0700 (PDT) Message-ID: Date: Thu, 20 Sep 2007 16:25:19 -0500 From: "Scott Marlowe" To: smiley2211 Subject: Re: Upgraded from 7.4 to 8.1.4 QUERIES NOW SLOW!!! Cc: pgsql-performance@postgresql.org In-Reply-To: <12805270.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <12803859.post@talk.nabble.com> <46F2CB62.4020409@mochima.com> <12805270.post@talk.nabble.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/338 X-Sequence-Number: 26883 On 9/20/07, smiley2211 wrote: > > No, I didn't UPGRADE it but that's what I inherited :( ...not sure of the > code page stuff because I am not the one who did the upgrade...I'm not sure > I know ENOUGH about POSTGRESQL to mess around with the codepage... > > Yes, I use vacuum analyze... > > Yes, I used the postgresql.conf of 7.4 and tried to match the 8.1.4 to > that...I didn't know where else to start...The users have been complaining > since DAY1 as I am told... OK, a few things you need to look into. Do you have horrendous bloating in the db. run vacuum verbose on your db and see what it says. You should probably turn on the autovacuum daemon either way. If your database has gotten bloated you may need to vacuum full / reindex to get your space back. What queries are slow, specifically. you can set the server to log long running servers in postgresql.conf. Find the longest running ones and run them by hand with explain analyze at the front, like: explain analyze select ..... lastly, run vmstat 10 from the command line while the machine is running slow and see where effort is going. I'm guessing you'll see a lot of id in there.