> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SHOW CLUSTER SETTING

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

The `SHOW CLUSTER SETTING` <InternalLink path="sql-statements">statement</InternalLink> displays the values of <InternalLink path="cluster-settings">cluster settings</InternalLink>.

To configure cluster settings, use <InternalLink path="set-cluster-setting">`SET CLUSTER SETTING`</InternalLink>.

<Note>
  The `SHOW` statement for cluster settings is unrelated to the other `SHOW` statements: <InternalLink path="show-vars">`SHOW session variable`</InternalLink>, <InternalLink path="show-create">`SHOW CREATE`</InternalLink>, <InternalLink path="show-users">`SHOW USERS`</InternalLink>, <InternalLink path="show-databases">`SHOW DATABASES`</InternalLink>, <InternalLink path="show-columns">`SHOW COLUMNS`</InternalLink>, <InternalLink path="show-grants">`SHOW GRANTS`</InternalLink>, and <InternalLink path="show-constraints">`SHOW CONSTRAINTS`</InternalLink>.
</Note>

## Details

* To display the value of a specific cluster setting, use the following syntax:

  ```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  SHOW CLUSTER SETTING <setting>;
  ```
* To display the values of *public* cluster settings (i.e., cluster settings that are documented and for which tuning is supported), use one of the following:

  ```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  SHOW CLUSTER SETTINGS;
  ```

  ```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  SHOW PUBLIC CLUSTER SETTINGS;
  ```
* To display the values of all cluster settings use one of the following:

  ```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  SHOW ALL CLUSTER SETTINGS;
  ```

  ```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  SHOW CLUSTER SETTING ALL;
  ```

  When you display all cluster settings, the table output includes a `public` column that denotes whether a setting is public or not.

## Required privileges

To use the `SHOW CLUSTER SETTING` statement, a user must have one of the following attributes:

* Be a member of the `admin` role (the `root` user belongs to the `admin` role by default).
* Have the `MODIFYCLUSTERSETTING` <InternalLink path="security-reference/authorization#privileges">system-level privilege</InternalLink> granted.
* Have the `VIEWCLUSTERSETTING` <InternalLink path="security-reference/authorization#supported-privileges">system-level privilege</InternalLink> (or the legacy `VIEWCLUSTERSETTING` <InternalLink path="security-reference/authorization">role option</InternalLink> ) defined.
* Have the `MODIFYSQLCLUSTERSETTING` <InternalLink path="security-reference/authorization#privileges">system-level privilege</InternalLink> granted. Users with this privilege are allowed to view only <InternalLink path="cluster-settings">`sql.defaults.*` cluster settings</InternalLink>, not all cluster settings.

## Synopsis

<img src="https://mintcdn.com/cockroachlabs/kYb5CU8_1XGPxWhU/images/sql-diagrams/v24.1/show_cluster_setting.svg?fit=max&auto=format&n=kYb5CU8_1XGPxWhU&q=85&s=7038bd261ef2d2863f5c72e15ef31784" alt="show_cluster_setting syntax diagram" style={{maxWidth: "100%", overflowX: "auto"}} width="549" height="213" data-path="images/sql-diagrams/v24.1/show_cluster_setting.svg" />

## Parameters

| Parameter   | Description                                                                                                                                                                                  |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `var\_name` | The name of the <InternalLink path="cluster-settings">cluster setting</InternalLink> (case-insensitive).                                                                                     |
| `ALL`       | Display all cluster settings.                                                                                                                                                                |
| `PUBLIC`    | Display only the public cluster settings. By default, only public settings are listed by `SHOW CLUSTER SETTINGS`. `SHOW PUBLIC CLUSTER SETTINGS` and `SHOW CLUSTER SETTINGS` are equivalent. |

## Response

When you query multiple cluster settings (e.g., with `SHOW CLUSTER SETTINGS`, or with `SHOW ALL CLUSTER SETTINGS`), the following fields are returned:

| Field            | Description                                                                                                                                                                                                                                                                                                |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `variable`       | The name of the cluster setting.                                                                                                                                                                                                                                                                           |
| `value`          | The value of the cluster setting.                                                                                                                                                                                                                                                                          |
| `setting_type`   | The type of the cluster setting.<br />Possible values for `setting_type` include:<ul><li>`b` (`true` or `false`)</li><li>`z` (size, in bytes)</li><li>`d` (duration)</li><li>`e` (one of a set of possible values)</li><li>`f` (floating-point value)</li><li>`i` (integer)</li><li>`s` (string)</li></ul> |
| `description`    | A brief description of the cluster setting, including possible values.                                                                                                                                                                                                                                     |
| `public`         | `true` if the cluster setting is public. This field is only included if all cluster settings are displayed.                                                                                                                                                                                                |
| `default\_value` | The default value of the cluster setting.                                                                                                                                                                                                                                                                  |
| `origin`         | The origin of the current value of the cluster setting.<br />Possible values for `origin` include:<ul><li>`default` (The current value has not been changed from the default value.)</li><li>`override` (The current value has been changed from the default value.)</li></ul>                             |

## Examples

### Show the value of a single cluster setting

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW CLUSTER SETTING diagnostics.reporting.enabled;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  diagnostics.reporting.enabled
---------------------------------
              true
(1 row)
```

### Show the values of all public cluster settings

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW CLUSTER SETTINGS;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
                     variable                    | value | setting_type |                                                 description
-------------------------------------------------+-------+--------------+---------------------------------------------------------------------------------------------------------------
  admission.kv.enabled                           | false | b            | when true, work performed by the KV layer is subject to admission control
  admission.sql_kv_response.enabled              | false | b            | when true, work performed by the SQL layer when receiving a KV response is subject to admission control
  admission.sql_sql_response.enabled             | false | b            | when true, work performed by the SQL layer when receiving a DistSQL response is subject to admission control
  bulkio.stream_ingestion.minimum_flush_interval | 5s    | d            | the minimum timestamp between flushes; flushes may still occur if internal buffers fill up
  ...
```

### Show the values of all cluster settings

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW ALL CLUSTER SETTINGS;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
                     variable                     | value | setting_type | public |                                                             description
--------------------------------------------------+-------+--------------+--------+--------------------------------------------------------------------------------------------------------------------------------------
  admission.kv.enabled                            | false | b            |  true  | when true, work performed by the KV layer is subject to admission control
  admission.kv_slot_adjuster.overload_threshold   | 32    | i            | false  | when the number of runnable goroutines per CPU is greater than this threshold, the slot adjuster considers the cpu to be overloaded
  admission.l0_file_count_overload_threshold      | 1000  | i            | false  | when the L0 file count exceeds this threshold, the store is considered overloaded
  admission.l0_sub_level_count_overload_threshold | 20    | i            | false  | when the L0 sub-level count exceeds this threshold, the store is considered overloaded
  ...
```

## See also

* <InternalLink path="set-cluster-setting">`SET CLUSTER SETTING`</InternalLink>
* <InternalLink path="reset-cluster-setting">`RESET CLUSTER SETTING`</InternalLink>
* <InternalLink path="cluster-settings">Cluster settings</InternalLink>
* <InternalLink path="show-vars">`SHOW session variable`</InternalLink>
* <InternalLink path="show-columns">`SHOW COLUMNS`</InternalLink>
* <InternalLink path="show-constraints">`SHOW CONSTRAINTS`</InternalLink>
* <InternalLink path="show-create">`SHOW CREATE`</InternalLink>
* <InternalLink path="show-databases">`SHOW DATABASES`</InternalLink>
* <InternalLink path="show-grants">`SHOW GRANTS`</InternalLink>
* <InternalLink path="show-index">`SHOW INDEX`</InternalLink>
* <InternalLink path="show-users">`SHOW USERS`</InternalLink>
* <InternalLink path="show-default-session-variables-for-role">`SHOW DEFAULT SESSION VARIABLES FOR ROLE`</InternalLink>
