Re: [GENERAL] query planner weirdness?

2008-06-28 Thread Bob Duffey
2008/6/28 Steve Atkins <[EMAIL PROTECTED]>: > > On Jun 27, 2008, at 9:53 PM, Adam Rich wrote: > > >> >>> "Bob Duffey" <[EMAIL PROTECTED]> writes: >>> >>>> I'm seeing some query plans that I'm not expecting. The tabl

Re: [GENERAL] query planner weirdness?

2008-06-27 Thread Bob Duffey
2008/6/28 Adam Rich <[EMAIL PROTECTED]>: > > > This is not wrong, or at least not obviously wrong. A full-table > > indexscan is often slower than seqscan-and-sort. If the particular > > case is wrong for you, you need to look at adjusting the planner's > > cost parameters to match your environm

Re: [GENERAL] query planner weirdness?

2008-06-27 Thread Bob Duffey
2008/6/28 Tom Lane <[EMAIL PROTECTED]>: > "Bob Duffey" <[EMAIL PROTECTED]> writes: > > I'm seeing some query plans that I'm not expecting. The table in > question > > is reasonably big (130,000,000 rows). The table has a primary key, > inde

[GENERAL] query planner weirdness?

2008-06-27 Thread Bob Duffey
Hi, I'm seeing some query plans that I'm not expecting. The table in question is reasonably big (130,000,000 rows). The table has a primary key, indexed by one field ("ID", of type bigint). Thus, I would expect the following query to simply scan through the table using the primary key: select