Database Reference
In-Depth Information
-> Seq Scan on history (cost=0.00..1934580.00
rows=100000000 width=46) (actual
time=40.652..179067.049 rows=100000000 loops=1)
Planning time: 0.139 ms
Execution time: 441057.294 ms
(6 rows)
In the preceding example,
Sort Method
is
5474096kB
, so deining a bigger
value for
work_mem
improves the performance of the sort.
•
maintenance_workmem
: The memory used for maintenance work can be
conigured by utilizing the
maintenance_workmem
parameter. The default
value is 16 MB. Increasing the value can increment the performance of
the maintenance jobs such as
CREATE INDEX
,
VACUUM
, and
REINDEX
. The
following statement gives the value of
maintenance_work_mem
:
warehouse_db=# SHOW maintenance_work_mem;
maintenance_work_mem
----------------------
64MB
•
effective_cache_size
: This parameter is used to set the estimated memory
available for the operating system cache. The following statement shows the
resulting value of
effective_cache_size
:
warehouse_db=# SHOW effective_cache_size;
effective_cache_size
----------------------
4GB
(1 row)
•
checkpoint_segments
: This parameter is used to control the checkpoint.
It designates a checkpoint after the
checkpoint_segments
log ile is illed,
which is customarily 16 MB in size. The default value is 3. Increasing the
value reduces the disk I/O, which is deinitely a performance boost, and this
also increases the crash recovery time. The following statement shows the
default value of
checkpoint_segments
:
warehouse_db=# SHOW checkpoint_segments;
checkpoint_segments
---------------------
3
(1 row)