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 3F8079FB0D1 for ; Thu, 22 Jun 2006 15:18:22 -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 22474-03 for ; Thu, 22 Jun 2006 15:18:17 -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 616409FA68D for ; Thu, 22 Jun 2006 15:18:16 -0300 (ADT) Received: (qmail 17972 invoked from network); 22 Jun 2006 18:18:14 -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 ; 22 Jun 2006 18:18:14 -0000 In-Reply-To: <200606211819.08239.josh@agliodbs.com> References: <54D833BE-A58F-47B8-B070-2AEDC0802468@kineticode.com> <200606211819.08239.josh@agliodbs.com> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-performance@postgresql.org Content-Transfer-Encoding: 7bit From: David Wheeler Subject: Re: Performance of DOMAINs Date: Thu, 22 Jun 2006 11:18:12 -0700 To: josh@agliodbs.com X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/452 X-Sequence-Number: 19809 On Jun 21, 2006, at 18:19, Josh Berkus wrote: > Well, current case-insensitivity hacks definitely aren't compatible > with > LIKE as far as "begins with" indexes are concerned. Yes, currently I use LOWER() for my indexes and for all LIKE, =, etc. queries. This works well, but ORDER by of course isn't what I'd like. That's one of the things that Elein's email domain addresses, albeit with a USING keyword, which is unfortunate. > Of course, floating > LIKEs (%value%) are going to suck no matter what data type you're > using. Yes, I know that. :-) I avoid that. > I created an operator for CI equality ... =~ ... which performs > well on > indexed columns. But it doesn't do "begins with". Oops. So how could it perform well on indexed columns? > ITEXT is a TODO, but there are reasons why it's harder than it looks. I'm sure. I should bug potential future SoC students about it. ;-) Best, David