Re: So, is COUNT(*) fast now? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: So, is COUNT(*) fast now?
Date
Msg-id 15678.1319227553@sss.pgh.pa.us
Whole thread Raw
In response to Re: So, is COUNT(*) fast now?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: So, is COUNT(*) fast now?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: So, is COUNT(*) fast now?
Next
From: Robert Haas
Date:
Subject: Re: So, is COUNT(*) fast now?