Re: So, is COUNT(*) fast now?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: So, is COUNT(*) fast now?
Date: 2011-10-21 20:24:12
Message-ID: CA+TgmoaGKfu5kcZnQf_ZVjhy+micFdMhLiUaJZiXTHAVX2GTkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 21, 2011 at 3:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Anyhow, here's the scoop.  On my desktop machine running F14, running
>> SELECT sum(1) FROM pgbench_accounts in a tight loop, 60 s worth of
>> oprofile data:
>
>> 176830   13.0801  postgres                 postgres                 ExecProject
>
> Hm, that's weird.  In both these cases, I'd have expected that
> ExecProject would get optimized away thanks to selection of a physical
> tlist for the scan node.  Wonder if that got broken ...

If it did, it looks like it wasn't recent. I set up the same test
case on my MacBook using REL9_1_STABLE and REL9_0_STABLE and set a
breakpoint on ExecProject(). Both back-branches appear to also call
ExecProject() for every tuple.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-21 20:27:58 Re: psql command for bytea output
Previous Message Tom Lane 2011-10-21 20:05:53 Re: So, is COUNT(*) fast now?