Re: Various performance questions - Mailing list pgsql-performance

From Neil Conway
Subject Re: Various performance questions
Date
Msg-id 1067268893.460.31.camel@tokyo
Whole thread Raw
In response to Re: Various performance questions  (Tarhon-Onu Victor <mituc@iasi.rdsnet.ro>)
List 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



pgsql-performance by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Linux Filesystem Shootout
Next
From: Neil Conway
Date:
Subject: Re: Various performance questions