From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Improving count(*) |
Date: | 2005-11-18 19:56:20 |
Message-ID: | 20051118195620.GB26861@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Maxwell | 2005-11-18 19:56:52 | Re: Improving count(*) |
Previous Message | Oleg Bartunov | 2005-11-18 19:25:40 | Re: order by, for custom types |