difference between a unique constraint and a unique index ???

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: postgresql performance list <pgsql-performance(at)postgresql(dot)org>
Subject: difference between a unique constraint and a unique index ???
Date: 2007-11-12 14:51:30
Message-ID: E9D1152F-7846-4F03-A435-F1C05E034000@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

In order to get like queries to use an index with database initialized
with a UTF-8 character set I added a unique index to a table with a
varchar_pattern_ops

This table already had a unique constraint on the column so I dropped
the unique constraint.

I can't give exact measurements however this caused my application to
slow down considerably.

The only thing I can figure is that the varchar_pattern_ops operator
is significantly slower ???

Is there some other piece of the puzzle to fill in ?

Dave

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2007-11-12 14:56:30 Re: difference between a unique constraint and a unique index ???
Previous Message Shane Ambler 2007-11-12 10:23:13 Re: PostgreSQL vs MySQL, and FreeBSD