Re: Slow C Function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Adam Palmblad" <adam(at)terapeak(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow C Function
Date: 2006-05-10 03:52:09
Message-ID: 25876.1147233129@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Adam Palmblad" <adam(at)terapeak(dot)com> writes:
> We've got a C function that we use here and we find that for every
> connection, the first run of the function is much slower than any
> subsequent runs. ( 50ms compared to 8ms)

Perhaps that represents the time needed to load the dynamic library
into the backend? If so, the "preload_libraries" parameter might
help you fix it. Or consider pooling connections. Or build a custom
executable with the function linked in permanently.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alan Hodgson 2006-05-10 04:08:33 Re: VACUUM killing my CPU
Previous Message Scott Lamb 2006-05-10 03:37:14 Re: [PERFORM] Arguments Pro/Contra Software Raid