X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DF3028BA096 for ; Mon, 14 Feb 2005 20:42:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64192-09 for ; Mon, 14 Feb 2005 20:42:18 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id CFE378BA095 for ; Mon, 14 Feb 2005 20:42:17 +0000 (GMT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id ACC74351C2; Mon, 14 Feb 2005 12:42:14 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id A5E0D3514B; Mon, 14 Feb 2005 12:42:14 -0800 (PST) Date: Mon, 14 Feb 2005 12:42:14 -0800 (PST) From: Stephan Szabo To: Ivan Voras Cc: PFC , pgsql-performance@postgresql.org Subject: Re: String matching In-Reply-To: <42110AB2.1010903@fer.hr> Message-ID: <20050214124119.C4920@megazone.bigpanda.com> References: <421102A7.4090006@fer.hr> <42110AB2.1010903@fer.hr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/214 X-Sequence-Number: 10543 On Mon, 14 Feb 2005, Ivan Voras wrote: > PFC wrote: > > > > normally you shouldn't have to do anything, it should just work : > > > >> select field from table where field like 'abc%' > > > If it does not use the index, I saw on the mailing list that the > > locale could be an issue. > > Oh yes, I forgot about that :( I do have LC_COLLATE (on latin2)... > > It's a shame PostgreSQL doesn't allow collation rules on specific fields > - this field I'm using here will always be 7bit ASCII :( You can also create an index using a _pattern_ops operator class which should be usable even with other collations.