Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 3EFE89FBE60 for ; Tue, 3 Jul 2007 17:29:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 43427-07 for ; Tue, 3 Jul 2007 17:29:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 2B59A9FB613 for ; Tue, 3 Jul 2007 17:29:29 -0300 (ADT) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id B2FFE73E51; Tue, 3 Jul 2007 21:28:48 +0100 (BST) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id AF3CD27410E; Tue, 3 Jul 2007 21:28:48 +0100 (BST) Message-ID: <468AB180.9090503@archonet.com> Date: Tue, 03 Jul 2007 21:28:48 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: smiley2211 Cc: pgsql-performance@postgresql.org Subject: Re: Query is taking 5 HOURS to Complete on 8.1 version References: <11416966.post@talk.nabble.com> <11419885.post@talk.nabble.com> In-Reply-To: <11419885.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/25 X-Sequence-Number: 25709 smiley2211 wrote: > TOP shows CPU at 100% while executed the EXPLAIN ANALYZE...what does this > mean? > > 17519 postgres 25 0 3470m 43m 39m R 100 0.3 28:50.53 postmaster It means it's busy. Probably sorting/eliminating duplicates (see my answer posted just before this one). Keep an eye on "vmstat" too and see if there's much disk activity. -- Richard Huxton Archonet Ltd