---
name: "SHOW_POOL_CACHE"
section: "1"
platform: "linux"
package: "pgpool2"
version: "4.6.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SHOW_POOL_CACHE"
---

# SHOW\_POOL\_CACHE(1)

displays cache storage statistics

## NAME

SHOW\_POOL\_CACHE - displays cache storage statistics

## SYNOPSIS

```
   SHOW POOL_CACHE
```

## DESCRIPTION

**SHOW POOL\_CACHE** displays in memory query cache statistics if in memory query cache is enabled. Here is an example session: See Table 28, “Items displayed in show pool\_cache” for a description of each item.

```
    test=# \x
    \x
    Expanded display is on.
    test=# show pool_cache;
    show pool_cache;
    -[ RECORD 1 ]---------------+---------
    num_cache_hits              | 891703
    num_selects                 | 99995
    cache_hit_ratio             | 0.90
    num_hash_entries            | 131072
    used_hash_entries           | 99992
    num_cache_entries           | 99992
    used_cache_entries_size     | 12482600
    free_cache_entries_size     | 54626264
    fragment_cache_entries_size | 0
```

**Note**\

If the cache storage is memcached, values for all columns except num\_cache\_hits, num\_selects and cache\_hit\_ratio show 0.

**Table 28. Items displayed in show pool\_cache**

| | |
| --- | --- |
| **Name** | **Description** |
| num\_cache\_hits | The number of hits against the query cache. |
| num\_selects | The number of SELECT that did not hit against the query cache. |
| cache\_hit\_ratio | The cache hit ratio. Calculated as num\_cache\_hits/(num\_cache\_hits+num\_selects). |
| num\_hash\_entries | The number of entries in the hash table used to manage the cache. In order to manage large number of cache Pgpool-II uses the hash table. The number of hash entries is automatically adjusted to the nearest power of two greater than memqcache\_max\_num\_cache. For example, 100,000, which is the default for memqcache\_max\_num\_cache is adjusted to 131,072 (2 to the 17th power). |
| used\_hash\_entries | The number of used hash entries. If the value approaches num\_hash\_entries, it is recommended to increase num\_hash\_entries. Even if all the hash table entries are used, no error is raised. However, performance suffers because hash table entries and caches are reused to register new cache entries. |
| num\_cache\_entries | The number of cache entries already used. In the current implementation the number should be identical to used\_hash\_entries. |
| free\_cache\_entries\_size | The size in bytes of the unused cache. As this value approaches 0, it removes the registered cache and registers a new cache, which does not cause an error, but reduces performance. Consider to increase memqcache\_total\_size. |
| fragment\_cache\_entries\_size | The size in bytes of the fragmented cache. When a registered cache is evicted, the space becomes fragmented until the next time that block is reused. Pgpool-II writes cache in fixed-size blocks specified by memqcache\_cache\_block\_size. When a registered cache is evicted, the space becomes fragmented until the next time that block is reused. fragment\_cache\_entries\_size displays the total size of such fragmented regions. |
