Re: User Defined Functions/AM's inherently slow? - Mailing list pgsql-hackers

From Eric Ridge
Subject Re: User Defined Functions/AM's inherently slow?
Date
Msg-id 49E784E9-4971-11D8-B3E7-000A95BB5944@tcdi.com
Whole thread Raw
In response to Re: User Defined Functions/AM's inherently slow?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: User Defined Functions/AM's inherently slow?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: User Defined Functions/AM's inherently slow?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jan 17, 2004, at 11:33 PM, Tom Lane wrote:
> The difference between "total runtime" and the top plan node's runtime
> has to represent plan startup/shutdown time.  I'm suspicious that your
> stubs are somehow not initializing something, though on first glance I
> do not see what.

I can't see anything either... which is why I brought it up.  I'm still 
a noob with this stuff, and thought maybe I was just missing something.

> Theory B would be that there's some huge overhead in calling 
> non-built-in
> functions on your platform.  We do know that looking up a "C" function 
> is
> significantly more expensive than looking up a "builtin" function, but
> there should only be half a dozen such calls involved in this test 
> case;
> it's hard to credit that that takes 200 msec.  Does the time drop at 
> all
> on second and subsequent repetitions in a single backend run?

Yes, it drops from about .680ms to the .250ish that I posted.

I suppose I should try compiling this little stub into postgres, eh?

eric





pgsql-hackers by date:

Previous
From: Eric Ridge
Date:
Subject: Re: User Defined Functions/AM's inherently slow?
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: User Defined Functions/AM's inherently slow?