Re: Avg performance for int8/numeric

From: "Luke Lonergan" <llonergan(at)greenplum(dot)com>
To: "Mark Kirkwood" <markir(at)paradise(dot)net(dot)nz>, "Neil Conway" <neilc(at)samurai(dot)com>
Cc: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>, "Eng" <eng(at)intranet(dot)greenplum(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Avg performance for int8/numeric
Date: 2006-11-25 01:38:30
Message-ID: C18CDE96.E77E%llonergan@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

So, if I understand this correctly, we're calling Alloc and ContextAlloc 10
times for every row being summed?

There are approx 10M rows and the profile snippet below shows 100M calls to
each of those.

- Luke

On 11/24/06 4:46 PM, "Mark Kirkwood" <markir(at)paradise(dot)net(dot)nz> wrote:

> time seconds seconds calls s/call s/call name
> 14.42 2.16 2.16 100002977 0.00 0.00 AllocSetAlloc
> 9.08 3.52 1.36 20000000 0.00 0.00 add_abs
> 5.54 4.35 0.83 10000000 0.00 0.00 slot_deform_tuple
> 5.41 5.16 0.81 60001673 0.00 0.00 AllocSetFree
> 4.34 5.81 0.65 10000000 0.00 0.00 construct_md_array
> 4.21 6.44 0.63 20000003 0.00 0.00 make_result
> 3.54 6.97 0.53 10000000 0.00 0.00 numeric_add
> 3.27 7.46 0.49 30000003 0.00 0.00 set_var_from_num
> 3.00 7.91 0.45 100002652 0.00 0.00 MemoryContextAlloc

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Luke Lonergan 2006-11-25 01:44:53 Re: [PATCHES] Avg performance for int8/numeric
Previous Message Mark Kirkwood 2006-11-25 00:48:39 Re: [PATCHES] Avg performance for int8/numeric

Browse pgsql-patches by date

  From Date Subject
Next Message Luke Lonergan 2006-11-25 01:44:53 Re: [PATCHES] Avg performance for int8/numeric
Previous Message Mark Kirkwood 2006-11-25 00:48:39 Re: [PATCHES] Avg performance for int8/numeric