Updated on 2025-10-10 GMT+08:00

GS_LSC_DBSTAT_INFO

The GS_LSC_DBSTAT_INFO view is used to obtain statistics about the Local RelCache and PartCache on the current node, such as the RelCache and PartCache hit information and LRU-based eviction. This view is supported only by clusters of version 9.1.1.100 or later.

Table 1 GS_LSC_DBSTAT_INFO columns

Column

Type

Description

thread_id

bigint

Thread ID

thread_name

text

Thread name

rel_searches

bigint

Number of RelCache searches

rel_hits

bigint

Number of RelCache hits

rel_miss

bigint

Number of reloads when no RelCache is hit

rel_count

bigint

Number of relations in the cache

rel_swapout_count

bigint

Number of relations evicted by LRU

rel_invalidate_count

bigint

Number of times that all RelCache instances are invalid

part_searches

bigint

Number of PartCache searches

part_hits

bigint

Number of PartCache hits

part_miss

bigint

Number of reloads when no PartCache is hit

part_count

bigint

Number of partitions in the cache

part_swapout_count

bigint

Number of partitions evicted by LRU

part_invalidate_count

bigint

Number of times that all PartCache instances are invalid

Example

Query the current view to collect statistics about the Local RelCache and 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)