Re: [BUGS] Query optimizer bug

2002-10-07 Thread Stephan Szabo
On Mon, 7 Oct 2002, Szymon Juraszczyk wrote: > The table contains some 4,7 milion rows. > > Let's try to have look for entries with account = 570: > It looks to me it's estimating that 4275 rows will match account=570. If you're using 7.2 and have analyzed, you may want to up the number of

[BUGS] Query optimizer bug

2002-10-07 Thread Szymon Juraszczyk
Hi, There is a bug in Postgresql query optimizer that makes the query that's supposed to return an empty result perform considerably slower when LIMIT clause is given. For exaple, the following query: select * from login_history where account = 570 order by timestamp; is performed in 0,28 m