Re: Re: LIKE optimization - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: Re: LIKE optimization
Date
Msg-id 3A65B04E.5F82397B@sayegh.de
Whole thread Raw
In response to LIKE optimization  (Nabil Sayegh <nsmail@sayegh.de>)
List 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)

pgsql-novice by date:

Previous
From: "rob"
Date:
Subject: Re: LIKE optimization
Next
From: Peter Rodriguez
Date:
Subject: Table recognition