On Tue, 11 Dec 2001 sharmad@goatelecom.com wrote:
> Hi,
> Having to manny indices to a table,does it effect the performance of a table.Like
> a table having following structure
Generally it'll affect the speed of transactions that write to the table.
>
> Name :
> First name,
> Second Name,
> Third name,
> Age,
> Address.
>
> Is it good here to have multiple indices like on only first name, only second
> name,only third name and all other combination of first ,second and third name
> or the performance increases when we have only 1 indice of all first ,second
> and third name
It mostly depends on what you're searching for in your queries.
PostgreSQL will attempt to use multi-column indexes for prefixing columns
(so an index on (a,b,c) can be used for queries that constrain a, but not
for queries that don't, a query that constrains a and c probably only
uses the index to constrain a, etc...)