Re: [SQL] Index Scan Backward vs. Sort/Sequential Scan when using ORDER BY

2001-09-03 Thread Tom Lane
Keith Bussey <[EMAIL PROTECTED]> writes: > In trying to figure out just why my ORDER BY queries were so slow, I came > across something interesting. The issue here seems to be that Postgres is drastically underestimating the number of rows that will come out of the indexscan in the second case:

[SQL] Index Scan Backward vs. Sort/Sequential Scan when using ORDER BY

2001-08-31 Thread Keith Bussey
Greetings, I have stumbled upon a confusing aspect of PostgreSQL queries involving ORDER BY. In trying to figure out just why my ORDER BY queries were so slow, I came across something interesting. First, let me give you 2 very similar queries: 1) SELECT p.uid FROM client_profiles p