Re: [HACKERS] Query planner, 7.2b1 select ... order by

2001-10-28 Thread Tom Lane
mlw <[EMAIL PROTECTED]> writes: > My problem is, if you do a select by the user name, it does an index > scan. If you do a select from the whole table, ordered by the user > name, it does a sequential scan not an index scan. It is arguable that > this may be a faster query, but at the cost of many

[HACKERS] Query planner, 7.2b1 select ... order by

2001-10-28 Thread mlw
I got an interesting question, and I can probably see both sides of any debate, but. Say you have a fairly large table, several million records. In this table you have a key that has a fairly good number of duplicate rows. It is a users favorites table, each user will have a number of entries