Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCA27-0006QE-6y for pgsql-performance@postgresql.org; Thu, 13 Sep 2012 14:04:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCA25-0001hV-4d for pgsql-performance@postgresql.org; Thu, 13 Sep 2012 14:04:42 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8DE4b7m025754; Thu, 13 Sep 2012 10:04:37 -0400 (EDT) From: Tom Lane To: Bill Martin cc: "pgsql-performance@postgresql.org" Subject: Re: Planner selects different execution plans depending on limit In-reply-to: References: Comments: In-reply-to Bill Martin message dated "Thu, 13 Sep 2012 09:05:26 -0000" Date: Thu, 13 Sep 2012 10:04:37 -0400 Message-ID: <25753.1347545077@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201209/52 X-Sequence-Number: 47798 Bill Martin writes: > I´ve tried different values for the statistics but it is all the same (the planner decide to switch to a seqscan if the limit is 10). > ALTER TABLE core_content ALTER column content SET STATISTICS 1000; Um, did you actually do an ANALYZE after changing that? regards, tom lane