软件下载吧文章资讯

分类分类

PostgreSQL 性能优化 服务器参数配置优化操作

2024-02-07 12:09作者:下载吧

大家好!我是只谈技术不剪发的 Tony 老师。今天我们来聊聊 PostgreSQL 的性能优化;数据库优化是一个系统的工程,本文只专注于服务器的参数配置优化。

默认安装时,PostgreSQL 的配置参数通常都偏小,不太适合作为生产服务器使用。所以,安装 PostgreSQL 数据库之后首先需要执行的操作就是对服务器的配置参数进行调整。

查看/设置参数值

我们使用 PostgreSQL 12,服务器的配置参数有 300 多个,运行时的参数值可以使用 SHOW 命令查看:

show server_version;
server_version|
————–|
12.3 |
show all;
name |setting |description |
———————————–|—————————————–|———————————————————————————————————-|
allow_system_table_mods |off |Allows modifications of the structure of system tables. |
application_name |DBeaver 7.0.5 – SQLEditor <Script-13.sql>|Sets the application name to be reported in statistics and logs. |
archive_cleanup_command | |Sets the shell command that will be executed at every restart point. |

展开全部

相关文章

说两句网友评论
    我要跟贴
    取消