finding a max value

Поиск
Список
Период
Сортировка
От Edoardo Ceccarelli
Тема finding a max value
Дата
Msg-id 40E5AE72.1080206@expot.it
обсуждение исходный текст
Список pgsql-admin
This is the query:
select max(KA) from annuncio

field KA is indexed and is int4,

explaining gives:
explain select max(KA) from annuncio;
QUERY PLAN
-----------------------------------------------------------------------
Aggregate (cost=21173.70..21173.70 rows=1 width=4)
-> Seq Scan on annuncio (cost=0.00..20326.76 rows=338776 width=4)
(2 rows)


wasn't supposed to do an index scan? it takes about 1sec to get the result.

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

Предыдущее
От:
Дата:
Сообщение: Forcing postgres to reload current time zone.
Следующее
От: Adam Smith
Дата:
Сообщение: Re: Is this a "Stupid Question" ?