Re: NOT LIKE much faster than LIKE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Andrea Arcangeli <andrea(at)cpushare(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: NOT LIKE much faster than LIKE?
Date: 2006-01-11 21:13:20
Message-ID: 28232.1137014000@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> On Wed, Jan 11, 2006 at 09:39:47PM +0100, Andrea Arcangeli wrote:
>> The index only helps the above query with = 0 and not the one with != 0,
>> but it seems not needed in practice.

> I suspect this is because of a lack of stats for functional indexes.

No, it's because != isn't an indexable operator.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bendik Rognlien Johansen 2006-01-11 21:30:58 Re: Slow query with joins
Previous Message Jim C. Nasby 2006-01-11 21:02:21 Re: NOT LIKE much faster than LIKE?