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

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

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Hmm, I guess there is a bit of a hotspot in StoreIndexTuple, which is
> probably being folded into IndexOnlyNext in the per-function timings:

> ExecClearTuple(slot);
> for (i = 0; i < nindexatts; i++)
> values[i] = index_getattr(itup, i + 1, itupdesc, &isnull[i]);
> ExecStoreVirtualTuple(slot);

I had wondered whether it'd be worth optimizing that along the lines of
slot_getallattrs(). But most indexes probably have only one column,
or anyway not enough to make for a useful savings.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-10-21 20:24:12 Re: So, is COUNT(*) fast now?
Previous Message Tom Lane 2011-10-21 19:55:37 Re: So, is COUNT(*) fast now?