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

影响:

相关推荐
IvorySQL1 天前
PostgreSQL 日报| GiST 索引扫描可见性缺陷(8 月 3 日)
数据库·人工智能·postgresql·开源
leeyi3 天前
Indexer + Retriever 源码:从 Eino 接口到 pgvector SQL(第73篇-E59)
postgresql·aigc·agent
隔窗听雨眠3 天前
80TB电商数据迁移实录:从PostgreSQL分析困境到Apache Doris架构突围
postgresql·架构·apache
在水一缸3 天前
PGSimCity:当数据库内核变成一座可以漫步的城市
数据库·postgresql·可视化·开源项目·数据库内核·pgsimcity·技术科普
long3164 天前
PostgreSQL 学习资料大全:从入门到精通
java·数据库·sql·postgresql
PGCCC4 天前
PostgreSQL 数据库认证体系技术解析:PCA / PCP / PCM 三级能力模型与考纲拆解
数据库·postgresql·pcm
long3164 天前
PostgreSQL 学习资料 · 入门 / 练习 / 精通 / 扩展
java·数据结构·数据库·spring boot·sql·postgresql·数据库开发
BullSmall4 天前
Anolis OS 8.10 Docker 部署 PostgreSQL 15 完整实操
docker·postgresql·容器
夜郎king5 天前
SpringBoot+PostgreSQL + 硅基流动大模型从零搭建 Text-to-SQL 智能问答系统
spring boot·postgresql·text-to-sql·llm大模型
2501_942389555 天前
Nifty IT指数的K线犹如断线的风筝
人工智能·postgresql·时序数据库·storm·tdengine