Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 817011337B4F for ; Mon, 14 Feb 2011 11:16:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 13871-04 for ; Mon, 14 Feb 2011 15:16:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mail.postgresql.org (Postfix) with ESMTP id E22211337B4A for ; Mon, 14 Feb 2011 11:16:31 -0400 (AST) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LwXJH-1QAITr1s4t-018Kge; Mon, 14 Feb 2011 16:16:28 +0100 Message-ID: <4D59474B.8060305@2ndquadrant.com> Date: Mon, 14 Feb 2011 10:16:27 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: gnanam@zoniac.com CC: 'Richard Huxton' , pgsql-performance@postgresql.org Subject: Re: How to boost performance of queries containing pattern matching characters References: <004601cbcc14$acfe99d0$06fbcd70$@com> <4D58D752.2000100@archonet.com> <004701cbcc18$c54c8980$4fe59c80$@com> <4D58DC35.8010007@archonet.com> <004801cbcc1b$3f1d4fe0$bd57efa0$@com> <4D58E048.9020506@archonet.com> <004c01cbcc1d$7fa04980$7ee0dc80$@com> In-Reply-To: <004c01cbcc1d$7fa04980$7ee0dc80$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:K+fRKhpr6NGgna+InlvZeHTfnY+qAy8rtR+j5yooX6/ TQJIedJRV4hwzJySZ/e36YeO665gHwON2gXTvJ1H/xWNhSFK23 iz8d0c5d4gkGowhs2yq+O0jQyROqpr7lBym55wfnzjbx1ArVdE Y9i6SLXRFzhUWS4PEjeKEOgnS9BT/wvrRfUnRvAVBtBUNKZNay /h513UwP57UMwEQyFTMUk3DS8LfiAKwxURMLZ3048Q= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201102/385 X-Sequence-Number: 42523 Gnanakumar wrote: > Thanks for your suggestion. Our production server is currently running > PostgreSQL v8.2.3. I think pg_trgm contrib module is not available for 8.2 > series. > You're going to find that most of the useful answers here will not work on 8.2. Full-text search was not fully integrated into the database until 8.3. Trying to run an app using it on 8.2 is going to be a constant headache for you. Also, moving from 8.2 to 8.3 is just a general performance boost in many ways. > Also, I read about WildSpeed - fast wildcard search for LIKE operator. What > is your opinion on that? > http://www.sai.msu.su/~megera/wiki/wildspeed > WildSpeed works fine if you can handle the massive disk space and maintenance overhead it introduces. I consider it useful only for data sets that are almost static, where you can afford to build its large index structure once and then use it to accelerate reads continuously, with minimal updates. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books