Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 4AA602E002E for ; Fri, 16 May 2008 15:43:17 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16072-01 for ; Fri, 16 May 2008 15:43:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.silentmedia.com (earth.silentmedia.com [216.254.19.12]) by developer.postgresql.org (Postfix) with ESMTP id 45C152E002D for ; Fri, 16 May 2008 15:43:14 -0300 (ADT) Received: by mail.silentmedia.com (Postfix, from userid 99) id B1A328773; Fri, 16 May 2008 11:43:12 -0700 (PDT) Received: from GRD (GRD [10.125.42.6]) by mail.silentmedia.com (Postfix) with ESMTP id 82D778769; Fri, 16 May 2008 11:43:12 -0700 (PDT) Date: Fri, 16 May 2008 11:43:12 -0700 (PDT) From: Ben X-X-Sender: bench@localhost.localdomain To: Scott Marlowe cc: pgsql-performance@postgresql.org Subject: Re: very slow left join In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/253 X-Sequence-Number: 30221 On Fri, 16 May 2008, Scott Marlowe wrote: > Well, I'm guessing that you aren't in locale=C and that the text Correct, I am not. And my understanding is that by moving to the C locale, I would loose utf8 validation, so I don't want to go there. Though, it's news to me that I would get any kind of select performance boost with locale=C. Why would it help? > functions in your query aren't indexed. Try creating an index on them > something like: > > create index abc_txtfield_func on mytable (substring(textfield,1,5)); > > etc and see if that helps. It does not. :(