From: | "Nikolaus Dilger" <nikolaus(at)dilger(dot)cc> |
---|---|
To: | jdiehl(at)sandia(dot)gov |
Cc: | pgsql-sql(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Like search performance. |
Date: | 2003-04-30 17:08:28 |
Message-ID: | 20030430100829.9198.h014.c001.wm@mail.dilger.cc.criticalpath.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance pgsql-sql |
Jeffrey,
The best thing you can do is to have the wildcard % as
late as possible in your search condition.
So do like 'd%' instead of like '%d%' if you can.
Regards,
Nikolaus
On Wed, 30 Apr 2003 10:34:40 -0600, "Diehl, Jeffrey"
wrote:
>
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-04-30 17:33:17 | Re: Like search performance. |
Previous Message | SZUCS Gábor | 2003-04-30 16:59:52 | Re: Like search performance. |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-04-30 17:33:17 | Re: Like search performance. |
Previous Message | SZUCS Gábor | 2003-04-30 16:59:52 | Re: Like search performance. |