Re: Re: LIKE optimization

From: Nabil Sayegh <nsmail(at)sayegh(dot)de>
To: rob <rob(at)cabrion(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Re: LIKE optimization
Date: 2001-01-17 14:46:38
Message-ID: 3A65B04E.5F82397B@sayegh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

rob wrote:
>
> Then the application need not append anything for blank search fields. It's
> just complicating things.

That's what I'm doing, I just wondered why ... LIKE '%' ... wasn't
skipped automagically.
I use templates in my webinterface and it would be much more convenient
to just drop the (user-)input into
the select statement. Now I have to do fall differentiation which costs
time (money) and maintenance.

I'm almost sure that it's my fault (wrong/missing indices etc.). But
LIKE '%' should be ignored
by the optimizer (at least on NOT NULL attributes).

cu

--
Nabil Sayegh
GPG-Key available at http://www.sayegh.de
(see http://www.gnupg.org for details)

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-01-17 16:05:53 Re: Problems with authentication
Previous Message rob 2001-01-17 14:22:25 Re: LIKE optimization