From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ulf Lohbrügge <ulf.lohbruegge@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: High CPU Usage of "SET ROLE"
Date: Tue, 30 Oct 2018 16:27:43 -0400
Message-ID: <17063.1540931263@sss.pgh.pa.us> (raw)
In-Reply-To: <CABZYQRLv5TXS9P5VoK4n0LUy2KK0fmLPFCiCc5YHoGH5oSANyA@mail.gmail.com>
References: <CABZYQRJDKytuyyL-th+Kq2_D4fS-rrb3sgDG2Y4qsNT__GGD8Q@mail.gmail.com>
<82967.1540216668@sss.pgh.pa.us>
<CABZYQRLv5TXS9P5VoK4n0LUy2KK0fmLPFCiCc5YHoGH5oSANyA@mail.gmail.com>
=?UTF-8?Q?Ulf_Lohbr=C3=BCgge?= <ulf.lohbruegge@gmail.com> writes:
> I think I have found something here. It looks like that the order of
> statements is affecting their duration. I somehow have the feeling that the
> first statement after "RESET ROLE;" experiences a performance degradation.
Hm. It's well known that the first query executed in a *session* takes
a pretty big performance hit, because of the need to populate the
backend's catalog caches. I'm not very sure however why "RESET ROLE"
would result in a mass cache flush, if indeed that's what's happening.
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, ulf.lohbruegge@gmail.com
Subject: Re: High CPU Usage of "SET ROLE"
In-Reply-To: <17063.1540931263@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