Re: Huge speed penalty using <>TRUE instead of =FALSE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan-Ivar Mellingen <jan-ivar(dot)mellingen(at)alreg(dot)no>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Huge speed penalty using <>TRUE instead of =FALSE
Date: 2009-07-17 14:11:49
Message-ID: 29115.1247839909@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jan-Ivar Mellingen <jan-ivar(dot)mellingen(at)alreg(dot)no> writes:
> One of our customers discovered that by replacing <>TRUE with =FALSE in
> a query of a table containing 750.000 records reduced the query time
> from about 12 seconds to about 60 milliseconds!

This is not a bug. The set of operators that are indexable is well
documented, and <> is not one of them.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-07-17 14:21:43 Re: Huge speed penalty using <>TRUE instead of =FALSE
Previous Message Peter Eisentraut 2009-07-17 12:35:29 Re: Huge speed penalty using <>TRUE instead of =FALSE