Jim, I'm fixing this by changing all quoted longs and int to unquoted values.
Jim C. Nasby wrote: > On Thu, Oct 05, 2006 at 07:18:37AM -0700, Aaron Stone wrote: >> Please post the plan if we replace >> status IN ('0', '1') >> with >> (status = '0' OR status = '1') >> because that would allow us to keep our symbolic constants in the >> source. I am also curious if this performs differently than IN because >> it sure looks the exact same thing ;-) > > Unless that field is actually a "char" or char(), you do not want to be > putting the numbers in quotes. At best, it's an additional cast for the > database. At worst, on older versions it won't cast that automatically, > meaning an index on status is useless. > > In any case, PostgreSQL handles IN the same as ( ... OR ... OR ... ). -- ________________________________________________________________ Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands________________________________http://www.nfg.nl