From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adam Palmblad <adam@terapeak.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow C Function
Date: Tue, 09 May 2006 23:52:09 -0400
Message-ID: <25876.1147233129@sss.pgh.pa.us> (raw)
In-Reply-To: <6B5AF6293A289F45826220B17ABE79370D5F4C@BORON.aers.local>
References: <6B5AF6293A289F45826220B17ABE79370D5F4C@BORON.aers.local>
"Adam Palmblad" <adam@terapeak.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
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, adam@terapeak.com
Subject: Re: Slow C Function
In-Reply-To: <25876.1147233129@sss.pgh.pa.us>
* 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