Re: [PERFORM] Bulk persistence strategy - Mailing list pgsql-performance

From Tom Lane
Subject Re: [PERFORM] Bulk persistence strategy
Date
Msg-id 32403.1495377186@sss.pgh.pa.us
Whole thread Raw
In response to [PERFORM] Bulk persistence strategy  (Riaan Stander <rstander@exa.co.za>)
Responses Re: [PERFORM] Bulk persistence strategy
List pgsql-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


pgsql-performance by date:

Previous
From: Rick Otten
Date:
Subject: Re: [PERFORM] pg_stat_statements with fetch
Next
From: Riaan Stander
Date:
Subject: Re: [PERFORM] Bulk persistence strategy