X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4FA05475B85 for ; Wed, 30 Apr 2003 13:26:36 -0400 (EDT) Received: from mail.deltav.hu (mail.deltav.hu [213.163.0.192]) by postgresql.org (Postfix) with ESMTP id 37B68475C15 for ; Wed, 30 Apr 2003 13:26:35 -0400 (EDT) Received: from fejleszt2 ([213.163.10.103]) by mail.deltav.hu (Netscape Messaging Server 3.6) with SMTP id AAA5BD3 for ; Wed, 30 Apr 2003 18:59:53 +0200 Message-ID: <02d601c30f39$eb1bb540$0a03a8c0@fejleszt2> From: =?iso-8859-1?Q?SZUCS_G=E1bor?= To: References: Subject: Re: Like search performance. Date: Wed, 30 Apr 2003 18:59:52 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-19.1 required=5.0 tests=BAYES_20,ORIGINAL_MESSAGE,QUOTED_EMAIL_TEXT,REFERENCES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/268 X-Sequence-Number: 1774 I'm not an expert, but AFAIK locale and collation heavily affects LIKE, and thus, IIRC there is no index search for like, maybe except the simplest locales (maybe C and/or en_US?) But if you mean it... there is a nasty trick in the archives: http://archives.postgresql.org/pgsql-general/2002-08/msg00819.php Really, really nasty, but really nice at the same time. G. -- while (!asleep()) sheep++; ---------------------------- cut here ------------------------------ ----- Original Message ----- From: "Diehl, Jeffrey" To: ; Sent: Wednesday, April 30, 2003 6:34 PM Subject: [PERFORM] Like search performance. > Hi all, > > I have a fairly large table with a char(20) field in it which I search on > quite a bit. The problem is that I tend to do a lot of > "...where field like '%-d%'" type searches on this field. > > Is there any to speed up this type of search? > > TIA, > > Mike Diehl. > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >