Received: from mail1.hub.org (webmail.hub.org [216.126.85.1]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8PITLh95557 for ; Tue, 25 Sep 2001 14:29:21 -0400 (EDT) (envelope-from ted@tvlconn.com) Received: from mail.tvlconn.com ([208.186.73.49]) by mail1.hub.org (8.11.3/8.11.4) with ESMTP id f8PIL3S93986 for ; Tue, 25 Sep 2001 14:21:03 -0400 (EDT) (envelope-from ted@tvlconn.com) Received: from ted (ted.tvlconn.com [192.168.0.171]) by mail.tvlconn.com (Postfix on SuSE eMail Server 2.0) with SMTP id 9EC6021C0DE; Tue, 25 Sep 2001 11:21:15 -0700 (PDT) From: "Ted Rolle" To: "'Stephan Szabo'" , Cc: Subject: Re: Efficient String searching Date: Tue, 25 Sep 2001 11:23:27 -0700 Message-ID: <001701c145ef$2c004500$ab00a8c0@ted> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: X-Archive-Number: 200109/113 X-Sequence-Number: 2214 Like an implementation of Boyer-Moore-...? -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Stephan Szabo Sent: September 25, 2001 10:43 AM To: Robert.Farrugia@go.com.mt Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Efficient String searching On Tue, 25 Sep 2001 Robert.Farrugia@go.com.mt wrote: > Hi, > > I have the following problem. When doing string searches using the ilike > command, no indexes are being used. This is giving performance problems, > whereas it takes longer to sequentially search the whole table. Am i > missing something about searching for strings ? Are there any efficient > methods than using regular expressions or like ? Unless your pattern is anchored at the start, indexes don't get used. In addition, if you're in a locale other than C, indexes don't get used. It depends on the kind of string searches you're doing. If you're looking for words in a longer string, you probably want to look at a full text indexing solution. IIRC, there's one in contrib and a few others made by people on the lists. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster