Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A3E1B1337B93 for ; Thu, 27 Jan 2011 12:40:55 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 41516-06 for ; Thu, 27 Jan 2011 16:40:48 +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 669D61337B83 for ; Thu, 27 Jan 2011 12:40:48 -0400 (AST) 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 p0RGel5C017269; Thu, 27 Jan 2011 11:40:47 -0500 (EST) To: David Wilson cc: Mladen Gogala , Kenneth Marshall , "pgsql-performance@postgresql.org" Subject: Re: Postgres 9.0 has a bias against indexes In-reply-to: References: <4D419214.8060003@vmsinfo.com> <20110127154539.GE6475@aart.is.rice.edu> <4D41959B.8020901@vmsinfo.com> Comments: In-reply-to David Wilson message dated "Thu, 27 Jan 2011 11:09:15 -0500" Date: Thu, 27 Jan 2011 11:40:47 -0500 Message-ID: <17268.1296146447@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: 201101/276 X-Sequence-Number: 42063 David Wilson writes: > You're still using a 14 row table, though. Exactly. Please note what it says in the fine manual: It is worth noting that EXPLAIN results should not be extrapolated to situations other than the one you are actually testing; for example, results on a toy-sized table cannot be assumed to apply to large tables. The planner's cost estimates are not linear and so it might choose a different plan for a larger or smaller table. An extreme example is that on a table that only occupies one disk page, you'll nearly always get a sequential scan plan whether indexes are available or not. The planner realizes that it's going to take one disk page read to process the table in any case, so there's no value in expending additional page reads to look at an index. regards, tom lane