| 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 19:52:46 |
| Message-ID: | CA+Tgmoaj03w5REVnpwwnhwNEaZFCYDZvMsu3yFAk=-b1vzomkQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Oct 21, 2011 at 3:07 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> [ oprofile results ]
*grovels through the line-by-line results*
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);
If I'm reading these results right, that section is about 3% of the
total number of samples.
Also, this line is kind of expensive:
if (!visibilitymap_test(scandesc->heapRelation,
ItemPointerGetBlockNumber(tid),
&node->ioss_VMBuffer))
Around 2%. But I don't see any way to avoid that, or even make it cheaper.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2011-10-21 19:55:37 | Re: So, is COUNT(*) fast now? |
| Previous Message | Robert Haas | 2011-10-21 19:07:26 | Re: So, is COUNT(*) fast now? |