Re: Indices for select count(*)?

Поиск
Список
Период
Сортировка
От Nicolas Barbier
Тема Re: Indices for select count(*)?
Дата
Msg-id b0f3f5a10512211325q7e382bbbga81c78242fbb7313@mail.gmail.com
обсуждение исходный текст
Ответ на Indices for select count(*)?  (Alexander Scholz <alexander.scholz1@freenet.de>)
Список pgsql-general
On 12/21/05, Alexander Scholz <alexander.scholz1@freenet.de> wrote:

> Regarding the performance flow when trying to find out how many records
> are currently being stored in the table, I don't see how an index should
> help... Nevertheless we've created an unique index on "ID" but SELECT
> count("ID") from "XYZ" still takes 35 seconds*. (ID is the primary key
> basing on a sequence, select count(*) isn't faster.)

I would like to redirect you to the zillions of mailing list posts
about this subject :-).

> So - what kind of indexing would speed this up then?

None.

greetings,
Nicolas

--
Nicolas Barbier
http://www.gnu.org/philosophy/no-word-attachments.html

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Indices for select count(*)?
Следующее
От: Marcus Engene
Дата:
Сообщение: Re: Indices for select count(*)?