Re: planning issue

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: Jonathan Vanasco <postgres(at)2xlp(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: planning issue
Date: 2007-03-19 10:05:44
Message-ID: 45FE6078.5030306@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jonathan Vanasco wrote:
> hoping someone may be able to offer advice:.
>
> SELECT
> *
> FROM
> table_a
> WHERE
> id != 10001
> AND
> (
> ( field_1 ilike '123' )
> OR
> ( field_2 ilike 'abc' )
> )

You seem to use that ilike expression merely as a case-insensitive
equals. May as well use that in combination with indices on
lower(field_[12]). It's probably faster than like or a regex match.

--
Alban Hertroys
alban(at)magproductions(dot)nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

// Integrate Your World //

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Elena 2007-03-19 10:30:40 Reference Type in PostgreSQL
Previous Message Gloria Rodriguez 2007-03-19 09:00:11 Re: java.net.SocketException: Connection reset