From: Michaeldba@sqlexec.com <Michaeldba@sqlexec.com>
To: Karthik Krishnakumar <karthikk@zohocorp.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Prepared statements generating a lot of temp files.
Date: Thu, 23 Mar 2023 05:13:19 -0400
Message-ID: <5267BF6F-73F8-4B94-94EA-F1A6A84DB5EB@sqlexec.com> (raw)
In-Reply-To: <1870db7265d.f259eb2750325.860651782313663792@zohocorp.com>
References: <1870db7265d.f259eb2750325.860651782313663792@zohocorp.com>
Look at the size of the bind variables and also whether you are doing bulk inserts
Sent from my iPad
> On Mar 23, 2023, at 5:10 AM, Karthik Krishnakumar <karthikk@zohocorp.com> wrote:
>
>
> Hi admins,
>
> I am analyzing temp files being generated using pg_badger.
> Under "queries generating the most temporary files", I am finding insert/update queries (via prepared statements) writing a lot of data to temp files.
> I am trying to figure why inserts are generating such temp files.
> Why are inserts/updates generating temp files?
> what can be done to avoid this ?
>
> thanks,
> karthik
>
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-admin@postgresql.org
Cc: Michaeldba@sqlexec.com, karthikk@zohocorp.com, pgsql-admin@lists.postgresql.org
Subject: Re: Prepared statements generating a lot of temp files.
In-Reply-To: <5267BF6F-73F8-4B94-94EA-F1A6A84DB5EB@sqlexec.com>
* 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