Planner-related settings

Effective cache size (effective_cache_size) should be set to an estimate of how much memory is available for disk caching in the operating system, and within the database, after taking into account what is used by the operating system and other applications. This value for a dedicated postgres server is around 50 percent to 70 percent of the total RAM.

Also, one could play with a planner setting, such as random_page_cost, to favor an index scan over sequential scans. The random_page_cost setting's default value is 4.0. In high-end SAN/NAS technologies, one could set this value to 3, and for SSD, one could use a random page cost of 1.5 to 2.5. The preceding list of parameters is minimal; in reality, one needs to also configure the logging, checkpoint, WAL settings, and vacuum settings.

Note that some parameters cannot be changed easily on production systems because they require a system restart, such as max_connections, shared_buffers, and fsync. In other cases, such as work_mem, it can be specified in the session, giving the developer the option of tuning queries that need specific work_mem.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset