Skip to main content
Version: 1.0.16

Query Optimization Parameters

seq_page_cost

Numeric type. Estimated cost of a sequential scan. Default value 1.0.

seq_page_cost = 1.0 # measured on an arbitrary scale

random_page_cost

Numeric type. Estimated cost of a random scan. Default value 4.0. SSD disks typically have better random access performance; it is recommended to set this to 1.1.

random_page_cost = 1.1

effective_cache_size

Numeric type (memory). This parameter is used for optimizer cost estimation. A larger value makes the optimizer more inclined to use indexes. Default value 4GB. It is recommended to set this to 50% of system memory.

effective_cache_size = 5865MB

default_statistics_target

Numeric type. Sets the default statistics target for table columns that do not have a column-specific target set via ALTER TABLE SET STATISTICS. Default value 100, range 1~10000.

default_statistics_target = 100 # range 1-10000

log_destination

String type. Multiple methods for recording server logs. Available values: stderr, csvlog, jsonlog, syslog. It is recommended to set this to csvlog.

log_destination = 'csvlog'
# stderr, csvlog, jsonlog, syslog, and
# eventlog, depending on platform.
# csvlog and jsonlog require
# logging_collector to be on.

logging_collector

Boolean type. Log collector. When enabled, logs are written to files. csvlog and jsonlog require this parameter to be on. Default value off. It is recommended to enable this. This parameter can only be set at instance startup.

logging_collector = on
# and csvlog into log files. Required
# to be on for csvlogs and jsonlogs.
# (change requires restart)

log_filename

String type. Log file name pattern, supporting strftime format. Default value postgresql-%Y-%m-%d_%H%M%S.log.

log_filename = 'haloserver-%Y-%m-%d_%H.log' # can include strftime() escapes