Postgres tuning example for Windows box with 16GB memory (Postgres configured to consume 8GB):
# The shared_buffers configuration parameter determines how much memory is dedicated to PostgreSQL to use for caching data.
shared_buffers = 512MB
# effective_cache_size should be set to an estimate of how much memory is available for disk caching by the operating
# system and within the database itself, after taking into account what's used by the OS itself and other applications
effective_cache_size = 6GB
# Increasing the work_mem parameter allows PostgreSQL to do larger in-memory sorts which, unsurprisingly, will be faster than disk-based equivalents.
work_mem = 64MB
# Specifies the maximum amount of memory to be used by maintenance operations, such as VACUUM, CREATE INDEX, and ALTER TABLE ADD FOREIGN KEY.
maintenance_work_mem = 512MB