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

清空postgresql的缓存

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

系统: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://www.zhiqiu.top/?id=126

分享给朋友:

相关文章

mysql启动失败 日志InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 3485

mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT betweenmysql版本:5.7.33系统版本:ubuntu16.04由于电脑突然关闭,跑在VMware里面的mys...

mysql 导出csv格式数据

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

dataX:超强的数据库数据互导工具

安装下载安装包http://datax-opensource.oss-cn-hangzhou.aliyuncs.com/datax.tar.gz 然后解压进入解压后文件的./bin自检命令python  datax.py ../j...

postgresql 的安装使用

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

postgresql修改数据存储位置

postgresql修改数据存储位置

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

被Navicat坑哭的日常,版本问题

mysql5.7DROP TABLE IF EXISTS `xxx_copy1`;CREATE TABLE `xxx_copy1`  (  `id` int(11) UNSIGNED NOT NULL AUTO_INCR...