Loading topic
work_mem can use much more memory than its value suggests when many queries run at once.2 min readpsql, can read a simple EXPLAIN plan, and can reload PostgreSQL configuration. Tuning starts with evidence. A setting that looks reasonable can still waste memory or increase disk I/O on a different workload.2 min readpsql, read RAM and disk measurements, and edit PostgreSQL configuration. You should also understand that PostgreSQL uses both its own buffer cache and the operating system's file cache.2 min readEXPLAIN plans and understand that PostgreSQL has a shared buffer cache. This chapter focuses on a planner estimate, not on reserving memory for the server.2 min readpsql, read a simple EXPLAIN plan, and distinguish server-wide settings from session settings.2 min readwork_mem, can read a simple EXPLAIN plan, and understand that each PostgreSQL operation may use its own memory. This chapter focuses on hash joins and hash aggregation.2 min readpsql, edit postgresql.conf, and read a simple EXPLAIN plan. This chapter focuses on maintenance memory, which is separate from memory used by ordinary query operations such as sorts and joins.2 min readpsql, read PostgreSQL settings, and distinguish server RAM from disk and the operating system page cache. The goal is to estimate peak memory use before increasing a setting.2 min readpsql, edit postgresql.conf, and read a simple EXPLAIN plan. This chapter focuses on write-ahead logging (WAL) and checkpoints. WAL records changes before PostgreSQL writes the changed data pages to the main data files. A checkpoint makes recovery faster by estab2 min readEXPLAIN output, understand RAM and disk I/O, and edit PostgreSQL configuration. It also assumes that you know the difference between reloading a setting and restarting the server.2 min readpostgresql.conf, and the ability to read a simple EXPLAIN plan. It also assumes you know that PostgreSQL can read data from shared buffers, the operating system's page cache, or disk.3 min readEXPLAIN plan, and reload PostgreSQL configuration. You should also know whether the database uses local SSD, network storage, or a hard disk.2 min readpostgresql.conf, and restart a test server. You should also know that shared_buffers is PostgreSQL’s shared buffer cache and that a restart differs from a configuration reload.2 min readpsql, and distinguish RAM, shared memory, and disk storage. You should also know how to reload PostgreSQL and inspect a Linux host.2 min readpsql, edit postgresql.conf, reload or restart PostgreSQL, and read a simple EXPLAIN plan. You also need a workload that represents real use, such as a test script or a known reporting query.2 min read