Posgresql Optimization Techniques

tekhunt

Chiazam Ochiegbu

Posted on July 31, 2023

Posgresql Optimization Techniques

Effect of Cache Size

effective_cache_size is used for the query planner to determine how much memory is available for disk caching.

It actually does not allocate any memory to the database, but
based on this number; the planner will decide whether enough RAM is available if index is used to improve the performance.
Normally having this parameter to hold half 12 of the total RAM is a reasonable setting.

More than ¾ of the total memory would lead the query planner to have a wrong estimation.

For the case of query optimization, effect_cache_size is an important parameter to tune.

Next in the series is work_mem, another optimization parameter to consider.

💖 💪 🙅 🚩
tekhunt
Chiazam Ochiegbu

Posted on July 31, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

VACUUM in PostgreSQL
apacheage VACUUM in PostgreSQL

August 5, 2023

Posgresql Optimization Techniques
apacheage Posgresql Optimization Techniques

July 31, 2023

PostgreSQL Joins
apacheage PostgreSQL Joins

June 9, 2023