Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F266437C678 for ; Mon, 12 Nov 2007 10:51:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 94897-01 for ; Mon, 12 Nov 2007 10:51:23 -0400 (AST) Received: from beaver.fastcrypt.com (beaver.fastcrypt.com [64.7.141.17]) by postgresql.org (Postfix) with ESMTP id B864337C672 for ; Mon, 12 Nov 2007 10:51:31 -0400 (AST) Received: from [192.168.1.14] (dcdsl.ebox.com [64.7.143.116]) by beaver.fastcrypt.com (Postfix) with ESMTP id 59F491580658 for ; Mon, 12 Nov 2007 10:01:11 -0500 (EST) Message-Id: From: Dave Cramer To: postgresql performance list Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v912) Subject: difference between a unique constraint and a unique index ??? Date: Mon, 12 Nov 2007 09:51:30 -0500 X-Mailer: Apple Mail (2.912) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/174 X-Sequence-Number: 27589 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