pg pg_prewarm用法

按照插件

bash 复制代码
> create extension pg_prewarm ;

缓存表

bash 复制代码
> test=# select pg_prewarm('weather','buffer' ) ;  pg_prewarm
> ------------
>           1

缓存表部分内容

bash 复制代码
test=# select pg_prewarm('weather','buffer','main',0,0) ;
 pg_prewarm
------------
          1
(1 row)

表大小只有0号页,只能缓存这么大

缓存索引

bash 复制代码
test=# \d+ weather
                                                  Table "public.weather"
  Column   |         Type          | Collation | Nullable | Default | Storage  | Compression | Stats target | Description
-----------+-----------------------+-----------+----------+---------+----------+-------------+--------------+-------------
 city      | character varying(80) |           |          |         | extended |             |              |
 temp_low  | integer               |           |          |         | plain    |             |              |
 temp_high | integer               |           |          |         | plain    |             |              |
 prcp      | real                  |           |          |         | plain    |             |              |
 date      | date                  |           |          |         | plain    |             |              |
Indexes:
    "idx_city" btree (city)
Access method: heap

test=# select pg_prewarm('idx_city','buffer' ) ;
 pg_prewarm
------------
          2

影响:

相关推荐
ldj202019 小时前
2025 Centos 安装PostgreSQL
linux·postgresql·centos
坤坤不爱吃鱼2 天前
【MySQL\Oracle\PostgreSQL】迁移到openGauss数据出现的问题解决方案
mysql·postgresql·oracle
行星0082 天前
PostgreSQL大表创建分区实战
数据库·postgresql
heart000_113 天前
拯救海量数据:PostgreSQL分区表性能优化实战手册(附压测对比)
数据库·postgresql·性能优化
忧愁的锅盖儿13 天前
PostgreSQL(二十七)索引内部结构
数据库·postgresql
静听山水15 天前
PostgreSQL/Hologres 外部数据包装器系统表 pg_foreign_data_wrapper 详解
数据库·postgresql
进击ing小白15 天前
项目中PostGreSql数据库的维护
数据库·postgresql·oracle
ZaaaaacK17 天前
Linux系统远程操作和程序编译
linux·运维·postgresql
haokan_Jia18 天前
java和postgresql替换多种空白字符(包括制表符、换行、空格等):
java·开发语言·postgresql
中国lanwp18 天前
DBeaver 中 Greenplum、PostgreSQL 和 PostgreSQL (old) 驱动的区别
数据库·postgresql