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

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 (view raw or flat)
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

pgsql-bugs by date

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

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