Postgresql相关的内存设置参数
来源:互联网 发布:淘宝网禁止出售保护 编辑:程序博客网 时间:2024/05/22 05:30
关于PostgreSQL有六个主要的参数设置。
第一:share_buffers
第二:temp_buffers
第三:max_prepared_transactions
第四:work_mem
第五:maintenance_work_mem
第六:max_stack_depth
share_buffers
Sets the number of shared memory buffers used by the database server.
该参数主要是跟操作系统的共享内存有关,简单的说,就是不要超过物理内存的总量。
相关操作系统的(linux)下,使用 cat /etc/sysctl.conf 命令后,查看两个属性kernel.shmall和kernel.shmmax
temp_buffers
Sets the maximum number of temporary buffers used by each database session.
这个参数很简单,就是设置连接数据库的session大小。
max_prepared_transactions
Sets the maximum number of transactions that can be in the "prepared" state simultaneously.
这个参数与设置的事务提交有关,有很高的可靠性。
work_mem
Specifies the amount of memory to be used by internal sort operations and hash tables before switching to temporary disk files.Sort operations are used for ORDER BY、distinct、and merge joins、Hash tables are used in hash joins,hash-bse aggregation,and hash-based processing of IN subqueries.
Also, serveral running sessions could be doing such operations concurrently.So the total memory used could be many times the value of work_mem.
这个参数主要用于查询条件带排序的,或者是hash表等相关的操作。work_mem是一个连接session独享的,不是多个连接session共享的。
maintenance_work_mem
Specifies the maximum amount of memory to be used in maintenance operations,such as VACUUM,CREATE INDEX, and ALTER TABLE ADD FOREIGN KEY.
该参数主要是一个database session在执行相关操作时所需要的空间容量。
max_stack_depth
Specifies the maximum safe depth of the server's execution stack.
第一:share_buffers
第二:temp_buffers
第三:max_prepared_transactions
第四:work_mem
第五:maintenance_work_mem
第六:max_stack_depth
share_buffers
Sets the number of shared memory buffers used by the database server.
该参数主要是跟操作系统的共享内存有关,简单的说,就是不要超过物理内存的总量。
相关操作系统的(linux)下,使用 cat /etc/sysctl.conf 命令后,查看两个属性kernel.shmall和kernel.shmmax
temp_buffers
Sets the maximum number of temporary buffers used by each database session.
这个参数很简单,就是设置连接数据库的session大小。
max_prepared_transactions
Sets the maximum number of transactions that can be in the "prepared" state simultaneously.
这个参数与设置的事务提交有关,有很高的可靠性。
work_mem
Specifies the amount of memory to be used by internal sort operations and hash tables before switching to temporary disk files.Sort operations are used for ORDER BY、distinct、and merge joins、Hash tables are used in hash joins,hash-bse aggregation,and hash-based processing of IN subqueries.
Also, serveral running sessions could be doing such operations concurrently.So the total memory used could be many times the value of work_mem.
这个参数主要用于查询条件带排序的,或者是hash表等相关的操作。work_mem是一个连接session独享的,不是多个连接session共享的。
maintenance_work_mem
Specifies the maximum amount of memory to be used in maintenance operations,such as VACUUM,CREATE INDEX, and ALTER TABLE ADD FOREIGN KEY.
该参数主要是一个database session在执行相关操作时所需要的空间容量。
max_stack_depth
Specifies the maximum safe depth of the server's execution stack.
- Postgresql相关的内存设置参数
- Postgresql相关的内存设置参数
- Postgresql vacuum freeze相关参数
- PostgreSQL与操作系统(OS)内核相关的几个参数
- 影响 PostgreSQL 的内存使用的配置参数
- PostgreSQL性能调优:设置适当的系统参数
- LINUX内存相关的内核参数
- LINUX内存相关的内核参数
- LINUX内存相关的内核参数
- PostgreSQL的相关连接
- 操作系统内存状态与postgresql内存设置
- Code::Blocks 编译参数的相关设置
- Code::Blocks 编译参数的相关设置
- tomcat下设置jvm的相关参数
- Code::Blocks 编译参数的相关设置
- postgresql的内存分配
- Tomcat相关的内存设置和优化
- hadoop-yarn架构的内存相关设置
- 南京三星研发中心(建邺) 面试题
- Java 理论与实践: 正确使用 Volatile 变量
- 坚持整理
- Java之开发者的十大戒律
- 数据结构之图-有向图的拓扑排序(8)
- Postgresql相关的内存设置参数
- poj 2402
- android Sms
- 第一次C程序设计上机报告
- HP-UX磁盘管理与文件系统
- Latex的使用笔记1 大文件编译易出错
- 系统迁移的注意事项
- 基于postgreSQL9.1的中文全文检索(基于Linux)
- 某某人知道-毛发