# compute\_pools

## Description

The `compute_pools` system table exposes metadata about the [compute pools](https://docs.deltastream.io/overview/core-concepts/sql) defined in the current organization. Each row represents a single compute pool and includes its configuration, current lifecycle state, and audit fields.

Use this table to programmatically inspect compute pool state, check for errors, or filter pools by size or status.

Only rows for compute pools on which the current role has `USAGE` privileges are returned.

## Syntax

```sql
SELECT column [, ...]
FROM deltastream.sys."compute_pools"
[ WHERE condition ];
```

## Columns

| Column                    | Type            | Nullable | Description                                                                                                     |
| ------------------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `name`                    | `VARCHAR`       | No       | Name of the compute pool.                                                                                       |
| `pool_size`               | `VARCHAR`       | No       | Size class of the compute pool. One of `small`, `medium`, `large`.                                              |
| `timeout_min`             | `INTEGER`       | No       | Number of minutes of inactivity after which the compute pool automatically stops. `0` means no timeout.         |
| `intended_state`          | `VARCHAR`       | No       | The state the compute pool has been instructed to be in. One of `running`, `stopped`.                           |
| `actual_state`            | `VARCHAR`       | No       | The observed current state of the compute pool. One of `running`, `stopped`, `starting`, `stopping`, `errored`. |
| `error_messages`          | `VARCHAR`       | Yes      | Any error messages associated with the compute pool when `actual_state` is `errored`.                           |
| `owner`                   | `VARCHAR`       | No       | The role that owns the compute pool.                                                                            |
| `created_by_role`         | `VARCHAR`       | No       | The role that created the compute pool.                                                                         |
| `created_by_role_deleted` | `BOOLEAN`       | No       | Whether the creating role has since been deleted.                                                               |
| `created_by`              | `VARCHAR`       | No       | The user that created the compute pool.                                                                         |
| `created_at`              | `TIMESTAMP_LTZ` | No       | Timestamp when the compute pool was created.                                                                    |
| `updated_by_role`         | `VARCHAR`       | No       | The role that last updated the compute pool.                                                                    |
| `updated_by_role_deleted` | `BOOLEAN`       | No       | Whether the last updating role has since been deleted.                                                          |
| `updated_by`              | `VARCHAR`       | No       | The user that last updated the compute pool.                                                                    |
| `updated_at`              | `TIMESTAMP_LTZ` | No       | Timestamp when the compute pool was last updated.                                                               |
| `organization_id`         | `VARCHAR`       | No       | The unique identifier of the organization this compute pool belongs to.                                         |

## Examples

#### List all compute pools

The following retrieves all compute pools visible to the current role:

```sql
SELECT * FROM deltastream.sys."compute_pools";
```

```sh
demodb.public/mystore# SELECT * FROM deltastream.sys."compute_pools";
[{"name":"mycp2","pool_size":"small","timeout_min":60,"intended_state":"stopped","actual_state":"stopped","error_messages":"","owner":"sysadmin","created_by_role":"sysadmin","created_by_role_deleted":false,"created_by":"user@example.com","created_at":"2025-05-23T22:18:11.027Z","updated_by_role":"","updated_by_role_deleted":false,"updated_by":"","updated_at":"2026-01-15T20:21:49.681Z","organization_id":"00000000-0000-0000-0000-000000000001"}]
```

#### Find compute pools that are running

The following filters to only pools currently in the `running` state:

```sql
SELECT name, pool_size, timeout_min, intended_state, actual_state
FROM deltastream.sys."compute_pools"
WHERE actual_state = 'running';
```

```sh
demodb.public/mystore# SELECT name, pool_size, timeout_min, intended_state, actual_state FROM deltastream.sys."compute_pools" WHERE actual_state = 'running';
[{"name":"my_pool","pool_size":"small","timeout_min":60,"intended_state":"running","actual_state":"running"}]
```

#### Find compute pools in an error state

The following returns any compute pools with errors along with the error detail:

```sql
SELECT name, actual_state, error_messages
FROM deltastream.sys."compute_pools"
WHERE actual_state = 'errored';
```

## See Also

* [CREATE COMPUTE\_POOL](https://github.com/deltastreaminc/ds-docs-gitbook/blob/main-dcap/reference/sql-syntax/ddl/create-compute-pool.md)
* [System Tables Overview](https://docs.deltastream.io/reference/sql-syntax/systables)
