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 D30C79FA3AF for ; Wed, 21 Jun 2006 22:19:28 -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 04036-04 for ; Wed, 21 Jun 2006 22:19:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by postgresql.org (Postfix) with ESMTP id C01B69FA322 for ; Wed, 21 Jun 2006 22:19:21 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO [192.168.1.27]) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 9630009; Wed, 21 Jun 2006 18:22:34 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: Performance of DOMAINs Date: Wed, 21 Jun 2006 18:19:07 -0700 User-Agent: KMail/1.8 Cc: David Wheeler References: <54D833BE-A58F-47B8-B070-2AEDC0802468@kineticode.com> In-Reply-To: <54D833BE-A58F-47B8-B070-2AEDC0802468@kineticode.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606211819.08239.josh@agliodbs.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/428 X-Sequence-Number: 19785 David, > 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? Well, current case-insensitivity hacks definitely aren't compatible with LIKE as far as "begins with" indexes are concerned. Of course, floating LIKEs (%value%) are going to suck no matter what data type you're using. I created an operator for CI equality ... =~ ... which performs well on indexed columns. But it doesn't do "begins with". ITEXT is a TODO, but there are reasons why it's harder than it looks. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco