> > Are those two syntaxes eqivalent ? > > > > select * from users where monitored; > > select * from users where monitored=true; > > > > If the answer is yes, the optimimer probably doesn't agree with you :) > > That depends on the definition of equivalent. They presumably give the > same answer (I'm assuming monitored is a boolean), but the latter has > something that's considered an indexable condition and I believe the > former does not (even with enable_seqscan=off the former syntax > appears to give a sequence scan, usually a good sign it's not considered > indexable).
I think his point is that they _should_ be equivalent. Surely there's something in the optimiser that discards '=true' stuff, like 'a=a' should be discarded? Chris ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]