Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 31EC21C0B199 for ; Fri, 20 Jul 2012 18:27:49 -0300 (ADT) Received: from mail.anatec.com ([87.84.168.242]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SsKjh-0005lS-Da for pgsql-performance@postgresql.org; Fri, 20 Jul 2012 21:27:48 +0000 Received: from [192.168.10.57] ([192.168.10.57]) by mail.anatec.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 20 Jul 2012 22:27:31 +0100 Message-ID: <5009CD43.8000300@anatec.com> Date: Fri, 20 Jul 2012 22:27:31 +0100 From: Ioannis Anagnostopoulos User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Claudio Freire CC: pgsql-performance@postgresql.org Subject: Re: A very long running query.... References: <5007FC82.9070007@anatec.com> <5009CB5A.7070801@anatec.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Jul 2012 21:27:31.0870 (UTC) FILETIME=[78B723E0:01CD66BE] X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/243 X-Sequence-Number: 47424 On 20/07/2012 22:23, Claudio Freire wrote: > On Fri, Jul 20, 2012 at 6:19 PM, Ioannis Anagnostopoulos > wrote: >> " -> Nested Loop (cost=0.00..20942.93 rows=53 width=144) (actual >> time=62.174..17783236.718 rows=387105 loops=1)" >> " Join Filter: (feed_all_y2012m07.message_copies.msg_id = >> feed_all_y2012m07.ship_pos_messages.msg_id)" >> " -> Append (cost=0.00..19057.93 rows=53 width=33) (actual >> time=62.124..5486473.545 rows=387524 loops=1)" > Misestimated row counts... did you try running an analyze, or upping > statistic targets? I have run analyse every so often. I think the problem is that as I get 16K new rows every minutes, the "stats" are always out... Possible?