does "select count(*) from mytable" always do a seq scan?

Поиск
Список
Период
Сортировка
От Culley Harrelson
Тема does "select count(*) from mytable" always do a seq scan?
Дата
Msg-id 529825a3050107064538c85b55@mail.gmail.com
обсуждение исходный текст
Ответы Re: does "select count(*) from mytable" always do a seq  (Tino Wildenhain <tino@wildenhain.de>)
Список pgsql-general
Hi,

I am using Postgresql 7.4.  I have a table with 1.5 million rows.  It
has a primary key. VACUUM FULL ANALYZE is run every night.  There are
2000-5000 inserts on this table every day but very few updates and
deletes.  When I select count(*) from this table it is using a
sequence scan.  Is this just life or is there some way to get this to
do an index scan?

culley

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

Предыдущее
От: Lonni J Friedman
Дата:
Сообщение: Re: PostgreSQL Deployment
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: does "select count(*) from mytable" always do a seq