Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id AF53C9FB846 for ; Fri, 9 Mar 2007 12:29:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 76563-03 for ; Fri, 9 Mar 2007 12:29:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id BFDD49FB8DB for ; Fri, 9 Mar 2007 12:29:33 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l29GTRPu000322; Fri, 9 Mar 2007 11:29:27 -0500 (EST) To: Gerardo Herzig cc: pgsql-sql@postgresql.org Subject: Re: index not being used. Why? In-reply-to: <45F176CA.3050107@fmed.uba.ar> References: <45F176CA.3050107@fmed.uba.ar> Comments: In-reply-to Gerardo Herzig message dated "Fri, 09 Mar 2007 12:01:30 -0300" Date: Fri, 09 Mar 2007 11:29:26 -0500 Message-ID: <321.1173457766@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.061 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200703/115 X-Sequence-Number: 27753 Gerardo Herzig writes: > Watch the last row of the explain command. It makes a sequential scan on the pages table, like it is not using the index on the "id" field. > The result itself is OK, but i will populate the tables so i think that later that sequential scan would be a problem. Why do you think that the plans won't change when the tables get bigger? regards, tom lane