[Jeffrey Tenny - Mon at 11:51:22AM -0400]
> There are some pitfalls to pgsql though, especially for existing SQL 
> code using MAX and some other things which can really be blindsided 
> (performance-wise) by pgsql if you don't use the workarounds.

Yes, I discovered that - "select max(num_attr)" does a full table scan even
if the figure can be found easily through an index.

There exists a workaround:

  select num_attr from my_table order by num_attr desc limit 1;

will find the number through the index.

Tobias Brox, Tallinn

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to