Re: [HACKERS] [GENERAL] when are indexes used?
Zeugswetter Andreas <andreas.zeugswetter@telecom.at>
From: Andreas Zeugswetter <andreas.zeugswetter@telecom.at>
To: infrared@a-b.hu, hackers@postgresql.org
Date: 1999-09-23T16:47:55Z
Lists: pgsql-hackers
1. run: vacuum auth; > real problem is with a ~6000 row database and a select * ... > order by query > which takes more than 5 sec. The same query runs for less > than 0.1 sec on mssql > :-(( No way you select 6000 rows in 0.1 sec with mssql, that would be 60000 rows/sec. Maybe you mean the first few rows show in 0.1s, this is possible. In PostgreSQL the order by alone currently does not use the index. Try: select * from auth where uid >= 0 order by uid; if you only have positive uid's. This should use the index. Andreas