From: Tom Lane <tgl@sss.pgh.pa.us>
To: Riaan Stander <rstander@exa.co.za>
Cc: pgsql-performance@postgresql.org
Subject: Re: Bulk persistence strategy
Date: Sun, 21 May 2017 10:33:06 -0400
Message-ID: <32403.1495377186@sss.pgh.pa.us> (raw)
In-Reply-To: <15c29aeedc8.27e1.e05fafc80f8daf1488764675043d44fb@exa.co.za>
References: <04c901d2a753$f55de020$e019a060$@exa.co.za>
<15c29aeedc8.27e1.e05fafc80f8daf1488764675043d44fb@exa.co.za>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Riaan Stander <rstander@exa.co.za> writes:
> I've come up with generating functions on the go, but I'm concerned about
> the performance impact of this. I first wanted to use an anonoumys code
> block, but then I cannot do parameter binding from npgsql.
> ...
> Is there a better way I'm missing and is "temp" function creation in
> Postgres a big performance concern, especially if a server is under load?
The function itself is only one pg_proc row, but if you're expecting
to do this thousands of times a minute you might have to adjust autovacuum
settings to avoid bad bloat in pg_proc.
If you're intending that these functions be use-once, it's fairly unclear
to me why you bother, as opposed to just issuing the underlying SQL
statements.
regards, tom lane
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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, rstander@exa.co.za
Subject: Re: Bulk persistence strategy
In-Reply-To: <32403.1495377186@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