pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeffrey Tenny <jeffrey.tenny@comcast.net>
To: pgsql-performance@postgresql.org
Subject: Redundant indexes?
Date: Fri, 27 May 2005 17:28:01 -0400
Message-ID: <429790E1.5040308@comcast.net> (raw)

Would I be correct in assuming that the following two indexes are 
completely redundant except for the fact that one complains about 
uniqueness constraint violations and the other does not?

Or is there are legitimate use for having BOTH indexes?

I'm trying to figure out if it's okay to delete the non-unique index.
(I have a bunch of tables suffering this malady from some problematic 
application code).

     Table "public.erf"
      Column |  Type   | Modifiers
     --------+---------+-----------
      rid    | integer | not null
      cid    | integer | not null
     Indexes: erf_rid_key unique btree (rid),
	     erf_rid_idx btree (rid)

     Index "public.erf_rid_idx"
      Column |  Type
     --------+---------
      rid    | integer
     btree, for table "public.erf"

     Index "public.erf_rid_key"
      Column |  Type
     --------+---------
      rid    | integer
     unique, btree, for table "public.erf"





view thread (2+ messages)  latest in thread

Message-ID: <429790E1.5040308@comcast.net>
Permalink:  ../429790E1.5040308@comcast.net/
Also on:    postgresql.org/message-id/429790E1.5040308@comcast.net

 · 

reply

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-performance@postgresql.org
  Cc: jeffrey.tenny@comcast.net
  Subject: Re: Redundant indexes?
  In-Reply-To: <429790E1.5040308@comcast.net>

* 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