時(shí)間:2024-02-07 12:09作者:下載吧人氣:30
大家好!我是只談技術(shù)不剪發(fā)的 Tony 老師。今天我們來聊聊 PostgreSQL 的性能優(yōu)化;數(shù)據(jù)庫優(yōu)化是一個(gè)系統(tǒng)的工程,本文只專注于服務(wù)器的參數(shù)配置優(yōu)化。
默認(rèn)安裝時(shí),PostgreSQL 的配置參數(shù)通常都偏小,不太適合作為生產(chǎn)服務(wù)器使用。所以,安裝 PostgreSQL 數(shù)據(jù)庫之后首先需要執(zhí)行的操作就是對服務(wù)器的配置參數(shù)進(jìn)行調(diào)整。
我們使用 PostgreSQL 12,服務(wù)器的配置參數(shù)有 300 多個(gè),運(yùn)行時(shí)的參數(shù)值可以使用 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. |
…
網(wǎng)友評論