Postgre
sql不直接在硬盘上
修改数据,它先把数据读到Postgre
sql共享内存缓冲区中,Postgre
sql后端在共享内存缓冲区中对数据读/写后,再把它们放回硬盘。 Backends that need to access tables f
irst look for needed blocks in this cache. If t
hey are already there,t
hey can continue processing right away. If not,an ope
rating sy
stem request is made to load the blocks. The blocks are loaded either from the kernel
disk buffer cache,or from
disk. These can be expensive operations. Postgre
sql的
默认设置分配了64个共享缓冲区,每个缓冲区8k,
增加缓冲区的数目使
数据库后端更有可能在缓存中找到它们需要的信息,这避免了使用代价更高的系统请求。可以通过
修改postmaster命令的
一个参数或者postgre
sql.conf
配置文件中的shared_buffers这一项来更改共享缓冲区数目。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。