Re: Work_mem

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Work_mem
Date: 2024-04-08 09:49:25
Message-ID: 3632675c58627968eb98086a8bec686621599dc8.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • Work_mem at 2024-04-08 06:50:06 from Rajesh Kumar

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2024-04-08 09:56:45 Re: How to tune SQL performance of function based columns of a view
Previous Message Laurenz Albe 2024-04-08 09:45:44 Re: Autovacuum------Doubts