effective_cache_size
Defaulting to 128 MB, effective_cache_size
is used to represent approximately how much total disk space is available for caching the database. This is normally set to the total of shared_buffers
plus the size of the operating system disk buffer cache after the database is started. This turns out to be greater than half of the total system memory on a typical dedicated database server. This setting does not allocate any memory itself, it simply serves as an advisory value for the planner about what should likely be available.
The only thing this is used for is a estimating whether an Index Scan will fit into the memory, with the alternative being a Sequential Scan. One area that is particularly impacted by this setting are nested loop joins that are using an inner Index Scan. As you reduce effective_cache_size
, it's less likely that will be considered an effective query execution plan.
While the scope where this parameter comes into play is pretty limited,...