Skip site navigation (1) Skip section navigation (2)

Re: Indexing question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alexander Priem" <ap(at)cict(dot)nl>
Cc: "Tomasz Myrta" <jasiek(at)klaster(dot)net>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Indexing question
Date: 2003-08-29 14:00:14
Message-ID: 15992.1062165614@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Alexander Priem" <ap(at)cict(dot)nl> writes:
> Does anyone know whether it is bad practise to have two indexes on the
> primary key of a table? (one 'primary key' index and one partial index)

It's a little unusual, but if you get enough performance boost from it
to justify the maintenance cost of the extra index, then I can't see
anything wrong with it.

The "if" is worth checking though.  I missed the start of this thread,
but what percentage of your rows do you expect to have null deleteddate?
Unless it's a pretty small percentage, I'm unconvinced that the extra
indexes will be worth their cost.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Andrew SullivanDate: 2003-08-29 14:05:08
Subject: Re: Hardware recommendations to scale to silly load
Previous:From: Oliver SiegmarDate: 2003-08-29 13:54:46
Subject: PL/pgSQL functions - text / varchar - havy performance issue?!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group