Re: Work_mem - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Work_mem
Date
Msg-id 3632675c58627968eb98086a8bec686621599dc8.camel@cybertec.at
Whole thread Raw
In response to [MASSMAIL]Work_mem  (Rajesh Kumar <rajeshkumar.dba09@gmail.com>)
List pgsql-admin
On Mon, 2024-04-08 at 12:20 +0530, Rajesh Kumar wrote:
> In a cluster, I have around 15dbs..out of which in 3 dbs creates of temp_files
> which means I belive work_mem allocation is not sufficient for those dbs. 
>
> Can I resolve this by increasing overall work_mem (set to 25MB now)?
>
> Or by setting work_mem to users consuming those 3 dbs?

Both would help.

> If I may want to increase how to decide on how much to increase?

You increase it ontil the performance is good, and frequently running
queries no longer need to create temporary files.

But you don't increase too much, otherwise you will run out of memory.

This is a question of trial and error, and it impossible to give you
exact numbers (even if we knew something about your system, which we don't).

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Autovacuum------Doubts
Next
From: Laurenz Albe
Date:
Subject: Re: How to tune SQL performance of function based columns of a view