pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Teran <david.teran@cluster9.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: PgSQL Performance ML <pgsql-performance@postgresql.org>
Subject: Re: speeding up a select with C function?
Date: Tue, 9 Mar 2004 10:54:10 +0100
Message-ID: <B67AECDE-71AF-11D8-A5BE-000A95C496AC@cluster9.com> (raw)
In-Reply-To: <404BCC6F.5060903@familyhealth.com.au>
References: <7F2B9EA0-702C-11D8-9DA8-000A95C496AC@cluster9.com>
	<404BCC6F.5060903@familyhealth.com.au>

Hi,


On 08.03.2004, at 02:29, Christopher Kings-Lynne wrote:

>> explain analyze select
>> ((t0.int_value-t1.int_value)*(t0.int_value-t1.int_value))
>> from job_property t0, job_property t1
>> where t0.id_job_profile = 5
>> and t1.id_job_profile = 6
>> and t1.id_job_attribute = t0.id_job_attribute
>> and t1.int_value < t0.int_value;
>
> Don't bother with C function, use SQL function instead.  You could get 
> a 50% speedup.
>
Is this always the case when using SQL instead of the C API to get 
values or only the function 'call' itself? We are thinking to use C 
functions which are optimized for the G5 altivec unit.

regards David




view thread (8+ messages)  latest in thread

Message-ID: <B67AECDE-71AF-11D8-A5BE-000A95C496AC@cluster9.com>
Permalink:  ../B67AECDE-71AF-11D8-A5BE-000A95C496AC@cluster9.com/
Also on:    postgresql.org/message-id/B67AECDE-71AF-11D8-A5BE-000A95C496AC@cluster9.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: david.teran@cluster9.com, chriskl@familyhealth.com.au
  Subject: Re: speeding up a select with C function?
  In-Reply-To: <B67AECDE-71AF-11D8-A5BE-000A95C496AC@cluster9.com>
  References: <7F2B9EA0-702C-11D8-9DA8-000A95C496AC@cluster9.com> <404BCC6F.5060903@familyhealth.com.au> <B67AECDE-71AF-11D8-A5BE-000A95C496AC@cluster9.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox