Re: Various performance questions

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tarhon-Onu Victor <mituc(at)iasi(dot)rdsnet(dot)ro>
Cc: Dror Matalon <dror(at)zapatec(dot)com>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Various performance questions
Date: 2003-10-27 15:34:53
Message-ID: 1067268893.460.31.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Neil Conway 2003-10-27 15:41:49 Re: Various performance questions
Previous Message Christopher Kings-Lynne 2003-10-27 15:16:05 Linux Filesystem Shootout