Re: which one is faster

Поиск
Список
Период
Сортировка
Искать
От
Mladen Gogala
Тема
Re: which one is faster
Дата
Msg-id
4CC6CA76.1020509@vmsinfo.com
Ответ на
Список
Дерево обсуждения
which one is faster AI Rumman <rummandba@gmail.com>
Re: which one is faster Mladen Gogala <mladen.gogala@vmsinfo.com>
Re: which one is faster Szymon Guz <mabewlun@gmail.com>
Re: which one is faster Marcin Mirosław <marcin@mejor.pl>
Re: which one is faster Szymon Guz <mabewlun@gmail.com>
Re: which one is faster Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: which one is faster Szymon Guz <mabewlun@gmail.com>
Re: which one is faster Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: which one is faster Szymon Guz <mabewlun@gmail.com>
On 10/26/2010 6:56 AM, AI Rumman wrote:
> Which one is faster?
> select count(*) from talble
> or
> select count(id) from table
> where id is the primary key.
PostgreSQL doesn't utilize the access methods known as "FULL INDEX SCAN" 
and "FAST FULL INDEX SCAN", so the optimizer will generate the 
sequential scan in both cases. In other words, PostgreSQL will read the 
entire table when counting, no matter what.

-- 
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com

В списке pgsql-performance по дате отправления
От: Robert Haas
Дата:
Сообщение: Re: Auto ANALYZE criteria
От: Robert Haas
Дата:
Сообщение: Re: BBU Cache vs. spindles
FAQ