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

Re: index usage in not like

From: Thom Brown <thombrown(at)gmail(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: index usage in not like
Date: 2010-02-18 12:00:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On 18 February 2010 11:55, AI Rumman <rummandba(at)gmail(dot)com> wrote:
> "Not like" operation does not use index.
> select * from vtiger_contactscf where lower(cf_1253) not like
> lower('Former%')
> I created index on lower(cf_1253).
> How can I ensure index usage in not like operation?
> Anyone please help.

How many rows do you have in your table?  If there are relatively few,
it probably guesses it to be cheaper to do a sequential scan and
calculate lower values on-the-fly rather than bother with the index.


In response to


pgsql-performance by date

Next:From: Thom BrownDate: 2010-02-18 12:14:03
Subject: Re: index usage in not like
Previous:From: AI RummanDate: 2010-02-18 11:55:52
Subject: index usage in not like

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