From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: sharmad@goatelecom.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Indices
Date: Tue, 11 Dec 2001 10:46:32 -0800 (PST)
Message-ID: <20011211104254.K79645-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3c1586d6.6d0.0@punweb01>
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...)
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-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, sharmad@goatelecom.com
Subject: Re: Indices
In-Reply-To: <20011211104254.K79645-100000@megazone23.bigpanda.com>
* 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