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

影响:

相关推荐
行业研究员3 小时前
腾讯云数据库 PostgreSQL 让相关子查询跑上多核
数据库·postgresql·腾讯云
IvorySQL6 小时前
PostgreSQL 日报 |SUM-AVG 溢出检测不足(9 月 5 日)
数据库·postgresql·区块链
像风一样自由202017 小时前
23.OCR在知识库中的作用扫描件和图片文字如何进入RAG
postgresql·大模型·ocr·rag
正在走向自律1 天前
FastGPT高并发登录故障根治方案:50人并发报错、PostgreSQL、MongoDB数据库深度优化手册
数据库·mongodb·postgresql
低代码布道师1 天前
外包项目管理平台全栈实战课02搭建数据底座:Next.js + PostgreSQL + Prisma 7
开发语言·javascript·postgresql·全栈开发
IvorySQL1 天前
代价比较的变革——PostgreSQL执行计划干预增强深度解析
数据库·postgresql·ffmpeg
yanwumuxi2 天前
Docker记录:误删宿主机挂载目录导致 PostgreSQL 数据丢失
docker·postgresql·容器
PGCCC_2 天前
PostgreSQL 报 no pg_hba.conf entry?认证配置 pg_hba.conf 一次讲透
postgresql
Harry Lei2 天前
长期记忆系统的设计与实现
spring boot·postgresql·embedding
jonyleek2 天前
低代码平台的数据架构设计:动态表单存储与查询优化
低代码·postgresql·开源·数据架构·动态表单·jvs低代码平台·jvs低代码