Re: optimizing a cpu-heavy query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joel Reymont <joelr1(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: optimizing a cpu-heavy query
Date: 2011-04-27 14:04:37
Message-ID: 14933.1303913077@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joel Reymont <joelr1(at)gmail(dot)com> writes:
> On Apr 26, 2011, at 5:00 PM, Tom Lane wrote:
>> For another couple orders of magnitude, convert the sub-function to C code. (I don't think you need
>> a whole data type, just a function that does the scalar product.)

> That's a 30x speedup, from 12 minutes down to 38s. Thanks Tom!

Huh, I would've bet on a lot more actually. The nodeFunctionscan and
nodeAgg code must not be as inefficient as it looks on the surface ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carlos Mennens 2011-04-27 14:29:13 Re: Switching Database Engines
Previous Message Raghavendra 2011-04-27 14:01:30 Re: Re: Create Database automatacally after silent installation of postgresql. ?