Re: Indices - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Indices
Date
Msg-id 20011211104254.K79645-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Indices  (sharmad@goatelecom.com)
List pgsql-sql
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...)




pgsql-sql by date:

Previous
From: "Ivan Manuel Andrade Muñoz"
Date:
Subject: postgresql v 7.1.3 error
Next
From: Terrence Brannon
Date:
Subject: how does one replace a row in Postgresql? (ala MySQL REPLACE)