X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D5FC6D1CCAC for ; Wed, 19 Nov 2003 19:15:23 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 45719-03 for ; Wed, 19 Nov 2003 15:14:53 -0400 (AST) Received: from p15140235.pureserver.info (sql-info.de [217.160.166.164]) by svr1.postgresql.org (Postfix) with ESMTP id 11F0DD1BB13 for ; Wed, 19 Nov 2003 15:14:52 -0400 (AST) Received: by p15140235.pureserver.info (Postfix, from userid 639) id E38EA203A; Wed, 19 Nov 2003 20:14:50 +0100 (CET) Received: from iwate.sql-info.de (pD9517DFE.dip.t-dialin.net [217.81.125.254]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by p15140235.pureserver.info (Postfix) with ESMTP id 03C1CEA1; Wed, 19 Nov 2003 20:14:49 +0100 (CET) From: Ian Barwick To: Stephan Szabo Subject: Re: TEXT column and indexing Date: Wed, 19 Nov 2003 20:13:42 +0100 User-Agent: KMail/1.5.1 Cc: pgsql-performance@postgresql.org References: <200311191018.18492.barwick@gmx.net> <20031119083025.R85482@megazone.bigpanda.com> In-Reply-To: <20031119083025.R85482@megazone.bigpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200311192013.42574.barwick@gmx.net> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/165 X-Sequence-Number: 4725 On Wednesday 19 November 2003 17:35, Stephan Szabo wrote: > On Wed, 19 Nov 2003, Ian Barwick wrote: > > I have this table: (...) > > You probably need to be querying like: > WHERE substr(value,1,128)='foo'; > in order to use that index. > > While substr(txtcol, 1,128) happens to have the property that it would be > probably be useful in a search against a short constant string, that's an > internal property of that function. That's the one :-). Thanks! Ian Barwick barwick@gmx.net