Re: Improving count(*)

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Improving count(*)
Дата
Msg-id 20051118195620.GB26861@surnet.cl
обсуждение исходный текст
Ответ на Re: Improving count(*)  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Список pgsql-hackers
Merlin Moncure wrote:
> > 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.

Oh, also it was mentioned on pgsql-advocacy that InnoDB is MVCC.  If
that's the case, I wonder how do they do the count(*) thing?  Is it fast?


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Improving count(*)
Следующее
От: Gregory Maxwell
Дата:
Сообщение: Re: Improving count(*)