Thanks to Jesse's sleuthing, what's really perplexing is that the original complaint about status < 2 is that it was killing Pg 7.4. The updated complaint is that IN (0, 1) is killing Pg 7.4 and < 2 is great.
On Fri, 2006-10-20 at 21:25 +0200, Paul J Stevens wrote: > Aaron, > > The cost differential is not that high here is it? Or are we logarithmic > here? > > Aaron Stone wrote: > > Ok, I think we should change the query in db_getmailbox_count to be < 2 > > because the plan really is a lot less expensive than IN (0, 1). I know > > this was a thread/bug we had a week or two ago, but it popped into my > > head today that maybe the planner was guessing the IN (0, 1) meant the > > same at < 2. It doesn't, and even on Pg 8, it's still more expensive. > > status in (0,1): > > Sort (cost=9.67..9.67 rows=1 width=8) > status < 2: > > Sort (cost=8.31..8.31 rows=2 width=8) > > > >