Skip site navigation (1) Skip section navigation (2)

Re: LIKE optimization

From: "rob" <rob(at)cabrion(dot)com>
To: "Nabil Sayegh" <nsmail(at)sayegh(dot)de>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: LIKE optimization
Date: 2001-01-17 14:22:25
Message-ID: 001101c08090$ea4e2650$4100fd0a@cabrion.org (view raw or flat)
Thread:
Lists: 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(at)sayegh(dot)de>
To: "rob" <rob(at)cabrion(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)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)
>


In response to

Responses

pgsql-novice by date

Next:From: Nabil SayeghDate: 2001-01-17 14:46:38
Subject: Re: Re: LIKE optimization
Previous:From: Paul Joseph McGeeDate: 2001-01-17 14:10:36
Subject: Type Creation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group