pgfincore缓存表
2023-04-20 本文已影响0人
何亮hook_8285
pgfincore缓存表
#创建pgfincore扩展
CREATE EXTENSION pgfincore;
#查询缓存表状态
select * from pgfincore('sync_camera');
#将某个表加载到缓存区
select * from pgfadvise_willneed('sync_camera');
#查看缓存区使用情况
select * from pgsysconf_pretty();
#将某个表释放缓存区的数据
select * from pgfadvise_dontneed('sync_camera');
#设置debug等级,总共5级
set client_min_messages TO debug1;
#查询sql执行策略
EXPLAIN (analyze ,verbose,buffers) with t1 as (
select * from sync_camera where area_id like '62%'
)
select * from t1 where t1.name like 'lanz%' and t1.id='45465465'