Re: Slow performance on MAX(primary_key)

Поиск
Список
Период
Сортировка
От Keith Gray
Тема Re: Slow performance on MAX(primary_key)
Дата
Msg-id 3DAE0883.6090709@heart.com.au
обсуждение исходный текст
Ответ на Re: Slow performance on MAX(primary_key)  (Ludwig Lim <lud_nowhere_man@yahoo.com>)
Ответы Re: Slow performance on MAX(primary_key)  (Richard Huxton <dev@archonet.com>)
Список 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Eric L. Blevins"
Дата:
Сообщение: Re: Help with SQL
Следующее
От: "Charles H. Woloszynski"
Дата:
Сообщение: Re: Slow performance on MAX(primary_key)