you can also try : select val FROM table ORDER BY val DESC LIMIT 1; which usually is much quicker. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance