Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBBIkWm75790 for ; Tue, 11 Dec 2001 13:46:36 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 93A48D5EE; Tue, 11 Dec 2001 10:46:32 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 895695BEE; Tue, 11 Dec 2001 10:46:32 -0800 (PST) Date: Tue, 11 Dec 2001 10:46:32 -0800 (PST) From: Stephan Szabo To: Cc: Subject: Re: Indices In-Reply-To: <3c1586d6.6d0.0@punweb01> Message-ID: <20011211104254.K79645-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200112/116 X-Sequence-Number: 5939 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...)