John Siracusa <siracusa(at)mindspring(dot)com> writes:
> 1. The query "select max(foo) from bar" where the column foo has an index.
> Aren't indexes ordered? If not, an "ordered index" would be useful in this
> situation so that this query, rather than doing a sequential scan of the
> whole table, would just "ask the index" for the max value and return nearly
> instantly.
http://www.postgresql.org/docs/current/static/functions-aggregate.html
-Neil
In response to
pgsql-performance by date
| Next: | From: Christopher Browne | Date: 2004-01-05 20:26:15 |
| Subject: Re: Select max(foo) and select count(*) optimization |
| Previous: | From: Rod Taylor | Date: 2004-01-05 20:14:24 |
| Subject: Re: deferred foreign keys |