Re: speeding up a select with C function?

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: David Teran <david(dot)teran(at)cluster9(dot)com>
Cc: PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: Re: speeding up a select with C function?
Date: 2004-03-08 01:29:19
Message-ID: 404BCC6F.5060903@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> 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.

Chris

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Dennis Bjorklund 2004-03-08 06:22:05 Re: speeding up a select with C function?
Previous Message Neil Conway 2004-03-08 00:43:58 Re: Using bigint needs explicit cast to use the index