Re: Improving count(*)

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Improving count(*)
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3417DD910@Herge.rcsinc.local
обсуждение исходный текст
Ответ на Improving count(*)  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Improving count(*)  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Improving count(*)  (Gregory Maxwell <gmaxwell@gmail.com>)
Список pgsql-hackers
> In Sybase ASE (and I'm pretty sure the same is true in Microsoft SQL
> Server) the leaf level of the narrowest index on the table is scanned,
> following a linked list of leaf pages.  Leaf pages can be pretty dense
> under Sybase, because they do use prefix compression.  A count(*)
> on a table with 100 million rows is going to take a few minutes, but
it
> is going to be at least an order of magnitude faster than a data page
> scan -- maybe two orders of magnitude faster.

MS SQL server (pre 2005) is not an MVCC database, so it's not apples to
apples with pg.  Many of the people who wander on this list and complain
about count(*) either come from one of those or some other non-MVCC
database or worse, a flat-file xbase type system.  A performance
comparison between MS 2005 and pg would be much more interesting.
Personally, I don't know what all the fuss is about [although I wouldn't
complain about an optimization ;)].

Merlin



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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: CLUSTER and clustered indices
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Improving count(*)