Josh Berkus <josh(at)agliodbs(dot)com> writes:
> Max() and Count() cannot use indexes for technical reasons. Browse through
> the archives of SQL, PERFORM, and HACKERS for about 12,000 discussions on the
Please don't confuse the issue by throwing Max() and Count() into the same
The issue with Min()/Max() is that the result could be generated efficiently
by scanning indexes but it's just hard, especially given generic aggregate
functions, and the work simply hasn't been done, or even started, yet.
The issue with Count() is that people want the result to be cached in a single
per-table counter, but that can't be done as simply as that because of
transactions. People have discussed complex solutions to this but it's a much
more complex problem than it appears.
They're really two entirely separate issues.
In response to
pgsql-sql by date
|Next:||From: Tsoloane Moahloli||Date: 2004-03-29 07:30:46|
|Subject: Re: date_part stored procs |
|Previous:||From: Markus Bertheau||Date: 2004-03-27 10:02:27|
|Subject: Re: Invalid Unicode Character Sequence found|