Re: Like search performance.

From: SZUCS Gábor <surrano(at)mailbox(dot)hu>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Like search performance.
Date: 2003-04-30 16:59:52
Message-ID: 02d601c30f39$eb1bb540$0a03a8c0@fejleszt2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-sql

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" <jdiehl(at)sandia(dot)gov>
To: <pgsql-sql(at)postgresql(dot)org>; <pgsql-performance(at)postgresql(dot)org>
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
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Nikolaus Dilger 2003-04-30 17:08:28 Re: Like search performance.
Previous Message Diehl, Jeffrey 2003-04-30 16:34:40 Like search performance.

Browse pgsql-sql by date

  From Date Subject
Next Message Nikolaus Dilger 2003-04-30 17:08:28 Re: Like search performance.
Previous Message Martin Chantler 2003-04-30 16:52:00 Stored Procedure Question