Cloud

pg_stat_get_numscans

The pg_stat_get_numscans() function returns the number of scans of a relation. Redpanda SQL collects no access statistics, so the function returns 0 for any relation.

Syntax

pg_stat_get_numscans(relation_oid)

Parameters

  • relation_oid: Object identifier (OID) of a relation. The type can be oid, integer, or bigint.

Return type

bigint. The function returns 0 for any relation, and NULL when the argument is a typed NULL, such as NULL::oid.

Examples

The function returns 0 for any OID:

SELECT pg_stat_get_numscans(0);

Suggested reading