Logic đáng ngạc nhiên của cài đặt work_mem trong Postgres, và cách điều chỉnh nó

Tác giả: pganalyze
Ngày xuất bản: 2024-06-17T00:00:00
Length: 07:38

Tóm tắt nội dung

Mô tả

*Find the article on our blog here:*

https://pganalyze.com/blog/5mins-postgres-work-mem-tuning

In E119 of "5mins of Postgres" we discuss tuning the Postgres work_mem setting for your workload, and why it can be quite confusing to interpret the meaning of work_mem correctly for a given query. We also discuss the impact of hash_mem_multiplier, and why it's default changed from 1.0 to 2.0 in Postgres 15.

*Learn more about pganalyze:*

https://pganalyze.com

https://pganalyze.com/newsletter

https://www.linkedin.com/company/pganalyze

*Check out the pganalyze library for eBooks, webinars, and more:*

https://pganalyze.com/resources

📑 *What we have discussed in this episode of 5mins of Postgres:*

*How to Get the Most out of Postgres Memory Settings - Blog post by Shaun Thomas on the Tembo blog*

https://tembo.io/blog/optimizing-memory-usage#working-memory

*Linux Memory Overcommit - Postgres documentation*

https://www.postgresql.org/docs/current/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT

*"Postgresql OOM" - Mailinglist response by Andres Freund on pgsql-hackers mailinglist*

https://www.postgresql.org/message-id/flat/20240612004920.3aadplpg7ars7lrm%40awork3.anarazel.de#1429f0309b0b508a0ffc3893f4ece2a3

*hash_mem_multiplier setting - Postgres documentation*

https://www.postgresql.org/docs/16/runtime-config-resource.html#GUC-HASH-MEM-MULTIPLIER

*"Time to increase hash_mem_multiplier default?" - Mailinglist thread by Peter Geoghegan on pgsql-hackers mailinglist*

https://www.postgresql.org/message-id/flat/CAH2-Wzndc_ROk6CY-bC6p9O53q974Y0Ey4WX8jcPbuTZYM4Q3A%40mail.gmail.com

*Everything you know about setting `work_mem` is wrong - Blog post by Christophe Pettus*

https://thebuild.com/blog/2023/03/13/everything-you-know-about-setting-work_mem-is-wrong/

#postgres #postgresql #queryoptimization

Dịch Vào Lúc: 2025-08-13T14:38:44Z

Yêu cầu dịch (Một bản dịch khoảng 5 phút)

Phiên bản 3 (ổn định)

Tối ưu hóa cho một người nói. Phù hợp cho video chia sẻ kiến thức hoặc giảng dạy.

Video Đề Xuất