Re: LIKE optimization - Mailing list pgsql-novice

From rob
Subject Re: LIKE optimization
Date
Msg-id 001101c08090$ea4e2650$4100fd0a@cabrion.org
Whole thread Raw
In response to LIKE optimization  (Nabil Sayegh <nsmail@sayegh.de>)
List pgsql-novice
Then the application need not append anything for blank search fields.  It's
just complicating things.

--rob

----- Original Message -----
From: "Nabil Sayegh" <nsmail@sayegh.de>
To: "rob" <rob@cabrion.com>
Cc: <pgsql-novice@postgresql.org>
Sent: Wednesday, January 17, 2001 5:48 AM
Subject: Re: LIKE optimization


> rob wrote:
> >
> > your using    table.attrib like '%'    to match everything except nulls
> > right?
> >
> > use table.attribute IS NOT NULL instead.
>
> No, it's the web interface to our hotel-db. People can search for eg.
> City but may leave this field blank.
> So % is always appended (sometimes also prepended).
>
> I didn't know that it doesn't match NULL, but fortunately the attributes
> are all NOT NULL.
>
> thx
> cu
>
> --
>  Nabil Sayegh
>  GPG-Key available at http://www.sayegh.de
>  (see http://www.gnupg.org for details)
>


pgsql-novice by date:

Previous
From: Nabil Sayegh
Date:
Subject: Re: Nested Queries
Next
From: Nabil Sayegh
Date:
Subject: Re: Re: LIKE optimization