当前位置:首页 > 数据库 > 正文内容

清空postgresql的缓存

root5年前 (2021-06-15)数据库2529

系统:centos,版本:postgresql-9.6

因为要测试postgresql的性能,当多次查询的时候查询结果会因为缓存用时很短,不能模拟出现实使用的场景。因此需要清除缓存。

首先stop掉postgresql

systemctl stop postgresql-9.6
清空高速缓存前尝试将数据刷新至磁盘

sync
释放linux内存

echo 3 > /proc/sys/vm/drop_caches

启动数据库

systemctl start postgresql-9.6


https://blog.csdn.net/kmblack1/article/details/78332575

扫描二维码推送至手机访问。

版权声明:本文由一叶知秋发布,如需转载请注明出处。

本文链接:https://zhiqiu.top/?id=126

分享给朋友:

相关文章

mysql 导出csv格式数据

mysql -e "select * from newsdb.t_hk_stock_news where id <100  ...

postgresql 的安装使用

安装centos系统 9.6版本# Install the repository RPMsudo yum install -y https://download.postgresql.org/pub/repos/yum/repor...

centos7 安装mysql

centos7 安装mysql

下载rpm包wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm 安裝包仓库yum -y install * 或者yum -...

postgresql修改数据存储位置

postgresql修改数据存储位置

最近公司提供了一台新的服务器,同时有一个盘是ssd。同时为了测试postgresql的性能,将数据放置到ssd上系统centos7.9 数据库postgresql-9.6首先停掉数据库systemctl stop pos...

clickhouse基本数据类型

整型有符号整型Int8 - [-128 : 127]Int16 - [-32768 : 32767]Int32 - [-2147483648 : 2147483647]Int64 - [-9223372036854775808 : 9223...

clickhouse的表引擎以及建表

表引擎分类引擎分类引擎名称MergeTree系列MergeTree 、ReplacingMergeTree 、SummingMergeTree 、 AggregatingMergeTree     CollapsingM...