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 0407AD1D387 for ; Wed, 31 Mar 2004 12:08:06 +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 80564-09 for ; Wed, 31 Mar 2004 08:07:57 -0400 (AST) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by svr1.postgresql.org (Postfix) with ESMTP id 9C213D1E8C2 for ; Wed, 31 Mar 2004 08:07:54 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1B8eVh-000LTn-0W; Wed, 31 Mar 2004 13:07:57 +0100 Received: by mainbox.archonet.com (Postfix, from userid 529) id BC54B16A82; Wed, 31 Mar 2004 13:07:56 +0100 (BST) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 1F1E5169F8; Wed, 31 Mar 2004 13:07:55 +0100 (BST) From: Richard Huxton To: "Priem, Alexander" , pgsql-performance@postgresql.org Subject: Re: What index for 'like (%keyword%)' ??? Date: Wed, 31 Mar 2004 13:07:54 +0100 User-Agent: KMail/1.5 References: <2A07EC2D0BC2774AAD6F74769F60D52A08329A@ahmose.cict_ad.nl> In-Reply-To: <2A07EC2D0BC2774AAD6F74769F60D52A08329A@ahmose.cict_ad.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403311307.54680.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/439 X-Sequence-Number: 6295 On Wednesday 31 March 2004 10:51, Priem, Alexander wrote: > Hi everyone, > > I am building a query which uses a clause like "Where doc_description like > '%keyword%'". I know a normal index won't be of any use here, but since the > table in question will get fairly big, I do want to use an index. > > Can anyone give me some advise on what kind of index I can use here? Or > shouldn't I use one in this case? You probably want to look at the contrib/tsearch2 full-text indexing module. -- Richard Huxton Archonet Ltd