X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EBC219FA65C for ; Wed, 21 Jun 2006 15:26:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 32918-04 for ; Wed, 21 Jun 2006 15:26:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by postgresql.org (Postfix) with ESMTP id A4B889F9CC1 for ; Wed, 21 Jun 2006 15:26:24 -0300 (ADT) Received: (qmail 10140 invoked from network); 21 Jun 2006 18:26:20 -0000 Received: from dsl093-038-250.pdx1.dsl.speakeasy.net (HELO [192.168.1.21]) (davidw@[66.93.38.250]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with RC4-SHA encrypted SMTP for ; 21 Jun 2006 18:26:20 -0000 Mime-Version: 1.0 (Apple Message framework v750) Content-Transfer-Encoding: 7bit Message-Id: <54D833BE-A58F-47B8-B070-2AEDC0802468@kineticode.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: PostgreSQL Performance List From: David Wheeler Subject: Performance of DOMAINs Date: Wed, 21 Jun 2006 11:26:16 -0700 X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/411 X-Sequence-Number: 19768 Howdy, Didn't see anything in the archives, so I thought I'd ask: has anyone done any work to gauge the performance penalty of using DOMAINs? I'm thinking of something like Elein's email DOMAIN: http://www.varlena.com/GeneralBits/ I figured that most simple domains that have a constraint check are no faster or slower than tables with constraints that validate a particular column. Is that the case? But I'm also interested in how Elein made the email domain case- insensitive, since I'd like to have/create a truly case-insensitive text type (ITEXT anyone?). The functions for the operator class there were mainly written in SQL, and if it adds a significant overhead, I'm not sure it'd be a good idea to use that approach for a case- insensitive text type, since I use it quite a lot in my apps, and often do LIKE queries against text data. Thoughts? Many TIA, David