GS_LSC_DBSTAT_INFO
GS_LSC_DBSTAT_INFO视图,用于获取当前节点Local RelCache、PartCache的统计信息,例如RelCache和PartCache缓存命中情况及LRU淘汰情况。该视图仅9.1.1.100及以上集群版本支持。
名称 |
类型 |
描述 |
---|---|---|
thread_id |
bigint |
线程号。 |
thread_name |
text |
线程名称。 |
rel_searches |
bigint |
RelCache查找次数。 |
rel_hits |
bigint |
RelCache命中次数。 |
rel_miss |
bigint |
RelCache未命中,重新加载次数。 |
rel_count |
bigint |
缓存中relation的数量。 |
rel_swapout_count |
bigint |
relation被LRU淘汰的数量。 |
rel_invalidate_count |
bigint |
RelCache全失效次数。 |
part_searches |
bigint |
PartCache查找次数。 |
part_hits |
bigint |
PartCache命中次数。 |
part_miss |
bigint |
PartCache未命中,重新加载次数。 |
part_count |
bigint |
缓存中partition的数量。 |
part_swapout_count |
bigint |
partition被LRU淘汰的数量。 |
part_invalidate_count |
bigint |
PartCache全失效次数。 |
应用示例
查询当前视图,统计Local RelCache、PartCache的统计信息。
1 2 3 4 5 |
SELECT * FROM GS_LSC_DBSTAT_INFO; thread_id | thread_name | rel_searches | rel_hits | rel_miss | rel_count | rel_swapout_count | rel_invalidate_count | part_searches | part_hits | part_miss | part_count | part_swapout_count | part_invalidate_count -----------------+------------------------+--------------+----------+----------+-----------+-------------------+----------------------+---------------+-----------+-----------+------------+--------------------+----------------------- 139761390696120 | postgres | 2067 | 2040 | 215 | 214 | 0 | 0 | 84 | 63 | 21 | 10 | 0 | 0 (1 rows) |