pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: SZUCS Gábor <surrano@mailbox.hu>
To: pgsql-performance@postgresql.org
Subject: Re: Like search performance.
Date: Wed, 30 Apr 2003 18:59:52 +0200
Message-ID: <02d601c30f39$eb1bb540$0a03a8c0@fejleszt2> (raw)
References: <B51F0C636E578A4E832D3958690CD73E0130C417@es04snlnt.sandia.gov>

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@sandia.gov>
To: <pgsql-sql@postgresql.org>; <pgsql-performance@postgresql.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
>




view thread (4+ messages)  latest in thread

Message-ID: <02d601c30f39$eb1bb540$0a03a8c0@fejleszt2>
Permalink:  ../02d601c30f39$eb1bb540$0a03a8c0@fejleszt2/
Also on:    postgresql.org/message-id/02d601c30f39$eb1bb540$0a03a8c0@fejleszt2

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: surrano@mailbox.hu, pgsql-performance@postgresql.org
  Subject: Re: Like search performance.
  In-Reply-To: <02d601c30f39$eb1bb540$0a03a8c0@fejleszt2>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox