| From: | Keith Gray <keith(at)heart(dot)com(dot)au> |
|---|---|
| To: | Richard Huxton <dev(at)archonet(dot)com> |
| Cc: | PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: Slow performance on MAX(primary_key) |
| Date: | 2002-10-17 00:46:59 |
| Message-ID: | 3DAE0883.6090709@heart.com.au |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Richard Huxton wrote:
>>> As of now, Max() doesn't utilizes the indices hence
>>>it always do a sequential scan.
>>Is this likely to be sorted in 7.2 ?
>>Is anyone looking at this?
> As I understand, the problem is that the optimisation only applies for simple
> cases...
Getting MIN() adn MAX() seems fairly trivial to me.
When is on an index or more importantly Primary
Key it must be a common SQL.
Would it be possible in the code to look at
the field in MIN() or MAX() and if it is
indexed use a similar method to the suggested
SQL work around?
Can I help this to happen?
--
Keith Gray
Technical Services Manager
Heart Consulting Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Charles H. Woloszynski | 2002-10-17 01:09:11 | Re: Slow performance on MAX(primary_key) |
| Previous Message | Eric L. Blevins | 2002-10-16 21:01:12 | Re: Help with SQL |