Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CF1D5632836 for ; Tue, 27 Jul 2010 01:19:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 41146-06 for ; Tue, 27 Jul 2010 04:19:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id A389D6321DB for ; Tue, 27 Jul 2010 01:19:06 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o6R4J3gJ029603; Tue, 27 Jul 2010 00:19:03 -0400 (EDT) To: =?UTF-8?Q?Piotr_Gasid=C5=82o?= cc: Vitalii Tymchyshyn , pgsql-performance@postgresql.org Subject: Re: Big difference in time returned by EXPLAIN ANALYZE SELECT ... AND SELECT ... In-reply-to: References: <4C4D5220.9010101@postnewspapers.com.au> <4C4D547E.50905@gmail.com> Comments: In-reply-to =?UTF-8?Q?Piotr_Gasid=C5=82o?= message dated "Mon, 26 Jul 2010 12:04:13 +0200" Date: Tue, 27 Jul 2010 00:19:03 -0400 Message-ID: <29602.1280204343@sss.pgh.pa.us> From: Tom Lane 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: 201007/395 X-Sequence-Number: 39784 =?UTF-8?Q?Piotr_Gasid=C5=82o?= writes: > Ok. Is there any way to tune postgresql, to shorten planning time for > such queries? You've got a ridiculously large number of partitions. Use fewer. regards, tom lane