pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
does work_mem is used on temp tables?
3+ messages / 2 participants
[nested] [flat]

* does work_mem is used on temp tables?
@ 2018-10-11 06:56  Mariel Cherkassky <mariel.cherkassky@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Mariel Cherkassky @ 2018-10-11 06:56 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org; pgsql-performance@lists.postgresql.org

Hi,
Does the work mem is used when I do sorts or hash operations on temp
tables  ? Or the temp_buffer that is allocated at the beginning of the
session is used for it ?

At one of our apps, the app create a temp table and run on it some
operations (joins,sum,count,avg ) and so on.. I saw in the postgresql.conf
that fs temp files are generated so I guested that the memory buffer that
was allocated for that session was too small. The question is should I
increase the work_mem or the temp_buffers ?

Thanks , Mariel.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: does work_mem is used on temp tables?
@ 2018-10-11 07:41  Andrew Gierth <andrew@tao11.riddles.org.uk>
  parent: Mariel Cherkassky <mariel.cherkassky@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Andrew Gierth @ 2018-10-11 07:41 UTC (permalink / raw)
  To: Mariel Cherkassky <mariel.cherkassky@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org; pgsql-performance@lists.postgresql.org

>>>>> "Mariel" == Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:

 Mariel> Hi,
 Mariel> Does the work mem is used when I do sorts or hash operations on
 Mariel> temp tables ? Or the temp_buffer that is allocated at the
 Mariel> beginning of the session is used for it ?

work_mem is used for sorts and hashes regardless of what type the
underlying table (if any) is.

temp_buffers is used to buffer the actual _content_ of temp tables.

-- 
Andrew (irc:RhodiumToad)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: does work_mem is used on temp tables?
@ 2018-10-11 07:58  Mariel Cherkassky <mariel.cherkassky@gmail.com>
  parent: Andrew Gierth <andrew@tao11.riddles.org.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Mariel Cherkassky @ 2018-10-11 07:58 UTC (permalink / raw)
  To: andrew@tao11.riddles.org.uk; +Cc: pgsql-admin@lists.postgresql.org; pgsql-performance@lists.postgresql.org

great, thanks !

‫בתאריך יום ה׳, 11 באוק׳ 2018 ב-10:42 מאת ‪Andrew Gierth‬‏ <‪
andrew@tao11.riddles.org.uk‬‏>:‬

> >>>>> "Mariel" == Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
>
>  Mariel> Hi,
>  Mariel> Does the work mem is used when I do sorts or hash operations on
>  Mariel> temp tables ? Or the temp_buffer that is allocated at the
>  Mariel> beginning of the session is used for it ?
>
> work_mem is used for sorts and hashes regardless of what type the
> underlying table (if any) is.
>
> temp_buffers is used to buffer the actual _content_ of temp tables.
>
> --
> Andrew (irc:RhodiumToad)
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-10-11 07:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 06:56 does work_mem is used on temp tables? Mariel Cherkassky <mariel.cherkassky@gmail.com>
2018-10-11 07:41 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-10-11 07:58   ` Mariel Cherkassky <mariel.cherkassky@gmail.com>

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