"select count(*) from contacts" is too slow!

Поиск
Список
Период
Сортировка
От Paul Serby
Тема "select count(*) from contacts" is too slow!
Дата
Msg-id 3F82F34D.9090608@clockltd.com
обсуждение исходный текст
Ответы Re: "select count(*) from contacts" is too slow!
Re: "select count(*) from contacts" is too slow!
Список pgsql-general
Why does 'select count(id) from "tblContacts"' do a sequential scan when the field 'id' is indexed using a btree?

MySql simply looks at the index which is keeping a handy record of the number of rows.

Can anybody explain how and why postgres does this query like it does?

Many thanks

Paul

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

Предыдущее
От: "Agostinho Sousa"
Дата:
Сообщение: Postgresql-7.3.4 rpm's for suse?
Следующее
От: Francois Suter
Дата:
Сообщение: Re: using copy to load odd characters