Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1BFA864FCFE for ; Fri, 22 Aug 2008 08:24:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 33555-09 for ; Fri, 22 Aug 2008 08:24:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.tauceti.net (tauceti.net [213.9.110.45]) by postgresql.org (Postfix) with ESMTP id C302464FCF8 for ; Fri, 22 Aug 2008 08:24:24 -0300 (ADT) Received: from [10.0.0.8] (unknown [10.0.0.8]) by www.tauceti.net (Postfix) with ESMTP id 23FCCC2D845; Fri, 22 Aug 2008 13:24:22 +0200 (CEST) Message-ID: <48AEA1E5.3080505@tauceti.net> Date: Fri, 22 Aug 2008 13:24:21 +0200 From: RW User-Agent: Thunderbird 2.0.0.16 (X11/20080812) MIME-Version: 1.0 To: c k CC: pgsql-general@postgresql.org Subject: Re: LIKE and SIMILAR TO References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/790 X-Sequence-Number: 136620 Maybe you should give tsearch2 a try and create a GIN index. Regex searches are sometimes a option. Robert c k wrote: > Hello all, > As we are migrating our ERP application from MySQL to PostgreSQL we > have some difficulties. One of them is use of Like and Similar to > operators. We often use LIKE to search a string from front-end without > case sensetivity. As postgreSQL's LIKE is case sensitive, we tried > ILIKE and SIMILAR TO, but both are slower than LIKE and we must need > case insensitivity. How can we get this by increases speed. All search > columns are VARCHAR(100)to VARCHAR(250). Currently without index. > > Thanks, > CPK