From: | David Teran <david(dot)teran(at)cluster9(dot)com> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: speeding up a select with C function? |
Date: | 2004-03-09 09:54:10 |
Message-ID: | B67AECDE-71AF-11D8-A5BE-000A95C496AC@cluster9.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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
From | Date | Subject | |
---|---|---|---|
Next Message | David Teran | 2004-03-09 12:02:41 | Re: speeding up a select with C function? |
Previous Message | Shridhar Daithankar | 2004-03-09 07:02:43 | [OT] Respository [was Re: [PERFORM] Feature request: smarter use of conditional indexes] |