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

# SHOW RESOURCE GROUPS

The `SHOW RESOURCE GROUPS` [statement](https://docs.cockroachlabs.com/docs/stable/sql-statements.md) lists the user-defined [resource groups](https://docs.cockroachlabs.com/docs/stable/resource-groups.md) in the cluster. The `SHOW RESOURCE GROUP` statement shows a single resource group.

> [!NOTE]
>
> **This feature is in [preview](https://docs.cockroachlabs.com/docs/releases/cockroachdb-feature-availability.md)** and subject to change. To share feedback and/or issues, contact [Support](https://support.cockroachlabs.com).

To use `SHOW RESOURCE GROUPS`, you must first [enable resource groups](https://docs.cockroachlabs.com/docs/stable/resource-groups.md#enable-resource-groups).

## Required privileges

Only members of the [`admin` role](https://docs.cockroachlabs.com/docs/stable/security-reference/authorization#admin-role) can view resource groups.

## Synopsis

To list all resource groups:

![show\_resource\_groups syntax diagram](https://mintcdn.com/cockroachlabs/iBfszXHb4tKmDGVE/images/sql-diagrams/v26.4/show_resource_groups.svg?fit=max\&auto=format\&n=iBfszXHb4tKmDGVE\&q=85\&s=4a8977761bcc24f25b5440745e69265f)

To show a single resource group:

![show\_resource\_group syntax diagram](https://mintcdn.com/cockroachlabs/iBfszXHb4tKmDGVE/images/sql-diagrams/v26.4/show_resource_group.svg?fit=max\&auto=format\&n=iBfszXHb4tKmDGVE\&q=85\&s=89c41680d49b8cb7d31a0d5c354f0b55)

## Parameters

| Parameter | Description |
| - | - |
| `name` | The name of the resource group to show. If no resource group with this name exists, `SHOW RESOURCE GROUP` returns an error. |

## Response

The following fields are returned for each resource group:

| Column | Type | Description |
| - | - | - |
| `id` | `INT` | The ID of the resource group. |
| `name` | `STRING` | The name of the resource group. |
| `cpu_weight` | `INT` | The CPU weight of the resource group. |
| `max_cpu` | `BOOL` | Whether the resource group stays in the burst tier when it uses more than its share of CPU. For details, refer to [`max_cpu`](https://docs.cockroachlabs.com/docs/stable/resource-groups#max_cpu). |
| `cpu_share_percent` | `FLOAT` | The resource group's `cpu_weight` as a percentage of the sum of the `cpu_weight` values of all user-defined resource groups. This value does not include the built-in resource groups. For details, refer to [How CPU is shared](https://docs.cockroachlabs.com/docs/stable/resource-groups.md#how-cpu-is-shared). |

`SHOW RESOURCE GROUPS` does not list the [built-in resource groups](https://docs.cockroachlabs.com/docs/stable/resource-groups.md#built-in-resource-groups).

## Examples

The examples on this page use the following resource groups:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
CREATE RESOURCE GROUP oltp WITH (cpu_weight = 300, max_cpu = true);
```

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
CREATE RESOURCE GROUP reporting WITH (cpu_weight = 100);
```

### Show all resource groups

The following statement lists all user-defined resource groups:

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

```
  id |   name    | cpu_weight | max_cpu | cpu_share_percent
-----+-----------+------------+---------+--------------------
  17 | oltp      |        300 |    t    |                75
  18 | reporting |        100 |    f    |                25
(2 rows)
```

### Show a single resource group

The following statement shows the `reporting` resource group. The `cpu_share_percent` value is calculated from the weights of all user-defined resource groups:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
SHOW RESOURCE GROUP reporting;
```

```
  id |   name    | cpu_weight | max_cpu | cpu_share_percent
-----+-----------+------------+---------+--------------------
  18 | reporting |        100 |    f    |                25
(1 row)
```

If the resource group does not exist, the statement returns an error:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
SHOW RESOURCE GROUP nosuch;
```

```
ERROR: resource group "nosuch" does not exist
SQLSTATE: 42704
```

## See also

* [Resource Groups](https://docs.cockroachlabs.com/docs/stable/resource-groups.md)
* [`CREATE RESOURCE GROUP`](https://docs.cockroachlabs.com/docs/stable/create-resource-group)
* [`ALTER RESOURCE GROUP`](https://docs.cockroachlabs.com/docs/stable/alter-resource-group)
* [`DROP RESOURCE GROUP`](https://docs.cockroachlabs.com/docs/stable/drop-resource-group)
* [SQL Statements](https://docs.cockroachlabs.com/docs/stable/sql-statements.md)
