Re: Can LIKE use indexes or not? - Mailing list pgsql-general

From Uwe C. Schroeder
Subject Re: Can LIKE use indexes or not?
Date
Msg-id 200402061144.48464.uwe@oss4u.com
Whole thread Raw
In response to Re: Can LIKE use indexes or not?  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Why don't you use

select * from t where new_upper_f ilike 'mmm%';

The ilike operator ignores case and you would get rid of the function call.

On Thursday 05 February 2004 01:20 am, John Sidney-Woollett wrote:
> John Sidney-Woollett said:
> > select * from t where new_upper_f like upper('MMM%');
>
> I think I meant
>
> select * from t where new_upper_f like 'MMM%';
>
> or
>
> select * from t where new_upper_f like upper('mmm%');
>
> John
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

- --
    UC

- --
Open Source Solutions 4U, LLC    2570 Fleetwood Drive
Phone:  +1 650 872 2425        San Bruno, CA 94066
Cell:   +1 650 302 2405        United States
Fax:    +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAI+6wjqGXBvRToM4RAgY8AKCmTr8JQpbDd+FMEZCG1ITVIYH+CQCeJ45C
IHZxeLxj60UL+TlhXfH6pdM=
=JOOY
-----END PGP SIGNATURE-----


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Run 2 versions of Postgresql on one machine?
Next
From: Mike Mascari
Date:
Subject: Re: Run 2 versions of Postgresql on one machine?