pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Neil Conway <neilc@samurai.com>
To: Tarhon-Onu Victor <mituc@iasi.rdsnet.ro>
Cc: Dror Matalon <dror@zapatec.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Various performance questions
Date: Mon, 27 Oct 2003 10:34:53 -0500
Message-ID: <1067268893.460.31.camel@tokyo> (raw)
In-Reply-To: <Pine.LNX.4.58.0310271708470.8898@blackblue.iasi.rdsnet.ro>
References: <20031026194449.GD2979@rlx11.zapatec.com>
	<Pine.LNX.4.58.0310271708470.8898@blackblue.iasi.rdsnet.ro>

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





view thread (23+ messages)  latest in thread

Message-ID: <1067268893.460.31.camel@tokyo>
Permalink:  ../1067268893.460.31.camel@tokyo/
Also on:    postgresql.org/message-id/1067268893.460.31.camel@tokyo

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: neilc@samurai.com, mituc@iasi.rdsnet.ro, dror@zapatec.com
  Subject: Re: Various performance questions
  In-Reply-To: <1067268893.460.31.camel@tokyo>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox