Re: [PERFORM] max/min and index usage

2006-12-05 Thread Tobias Brox
[Tom Lane - Tue at 10:29:53PM -0500] > These are not actually exactly the same thing. In particular, I suppose > your table contains a lot of nulls? Yes; I'm sorry I was a bit quick with the first posting. ---(end of broadcast)--- TIP 1: if posting

Re: [PERFORM] max/min and index usage

2006-12-05 Thread Tom Lane
Tobias Brox <[EMAIL PROTECTED]> writes: > We're using 8.1 - I thought such a construct was safe in pg 8.1: > select max(indexed_value) from huge_table; > while earlier we had to use: > select indexed_value from huge_table order by indexed_value desc limit 1; These are not actually exactly the sa

Re: [PERFORM] max/min and index usage

2006-12-05 Thread Tobias Brox
[Tobias Brox - Wed at 04:01:56AM +0100] > We're using 8.1 - I thought such a construct was safe in pg 8.1: > > select max(indexed_value) from huge_table; > > while earlier we had to use: > > select indexed_value from huge_table order by indexed_value desc limit 1; > > seems like I was wrong:

[PERFORM] max/min and index usage

2006-12-05 Thread Tobias Brox
We're using 8.1 - I thought such a construct was safe in pg 8.1: select max(indexed_value) from huge_table; while earlier we had to use: select indexed_value from huge_table order by indexed_value desc limit 1; seems like I was wrong: mydb=> explain analyze select indexed_value1 from mytabl