Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 596851337B7E for ; Mon, 15 Nov 2010 17:30:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 36982-10 for ; Mon, 15 Nov 2010 21:30:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wentylator.ang.com.pl (wentylator.ang.com.pl [89.174.215.202]) by mail.postgresql.org (Postfix) with ESMTP id 14DC91337B2F for ; Mon, 15 Nov 2010 17:30:34 -0400 (AST) Received: from Artur7 (cfidsl [83.18.105.226]) by wentylator.ang.com.pl (Postfix) with ESMTP id 9398F2DD260; Mon, 15 Nov 2010 22:30:38 +0100 (CET) From: =?iso-8859-2?Q?Artur_Zaj=B1c?= To: "'Tom Lane'" Cc: "'Robert Haas'" , References: <000001cb849e$1dce2720$596a7560$@ang.com.pl> <009d01cb8505$ce738900$6b5a9b00$@ang.com.pl> <7142.1289855035@sss.pgh.pa.us> In-Reply-To: <7142.1289855035@sss.pgh.pa.us> Subject: Re: Difference between explain analyze and real execution time Date: Mon, 15 Nov 2010 22:30:32 +0100 Message-ID: <009f01cb850c$55f962e0$01ec28a0$@ang.com.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQFsDnYhYIkerMawLWBzle0OUvs2zwGxik20AqW4E5YBY3cWEpQEJciA Content-Language: pl X-wentylator-MailScanner-Information: Please contact the ISP for more information X-wentylator-MailScanner: Found to be clean X-wentylator-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0, required 6, autolearn=not spam) X-wentylator-MailScanner-From: azajac@ang.com.pl 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: 201011/252 X-Sequence-Number: 41276 > I've changed default_statistics_target to 10000 and I think that is a > reason. > That's certainly going to cost you something, but this seems like a mighty large slowdown, especially for a non-join query. What datatype is te.idtr, anyway? Integer not null and primary key of t_positions table. Table t_positions has about 1500000 records, table t_st about 130000 records. ------------------------------------------- Artur Zajac