X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 650A5D1B4FB for ; Mon, 27 Oct 2003 15:35:28 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 73030-02 for ; Mon, 27 Oct 2003 11:35:01 -0400 (AST) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id 7FDEDD1B548 for ; Mon, 27 Oct 2003 11:34:57 -0400 (AST) Received: from 6-allhosts (d226-89-59.home.cgocable.net [24.226.89.59]) by bob.samurai.com (Postfix) with ESMTP id 9D3E51E41; Mon, 27 Oct 2003 10:34:57 -0500 (EST) Subject: Re: Various performance questions From: Neil Conway To: Tarhon-Onu Victor Cc: Dror Matalon , PostgreSQL Performance In-Reply-To: References: <20031026194449.GD2979@rlx11.zapatec.com> Content-Type: text/plain Message-Id: <1067268893.460.31.camel@tokyo> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 27 Oct 2003 10:34:53 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/672 X-Sequence-Number: 4420 On Mon, 2003-10-27 at 10:15, Tarhon-Onu Victor wrote: > select count(*) from items where channel < > 5000; will never use any of the current indexes because none matches > your WHERE clause (channel appears now only in multicolumn indexes). No -- a multi-column index can be used to answer queries on a prefix of the index's column list. So an index on (channel, xyz) can be used to answer queries on (just) "channel". -Neil