> ## Documentation Index
> Fetch the complete documentation index at: https://risingwavelabs-wyx-add-timestamp-dedicated-page.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# View and configure runtime parameters

## What are runtime parameters?

Runtime parameters are variables that can be set at runtime to configure the behavior of RisingWave. They are also known as session variables.

## How to view runtime parameters?

You can use the `SHOW ALL` command to view the runtime parameters, their current settings, and some notes about these parameters.

```bash theme={null}
SHOW ALL;
```

For example, you may see a table similar to this:

```bsh Runtime Parameters theme={null}
          Name                  |     Setting     |        Description
--------------------------------+-----------------+--------------------------------------
 implicit_flush                 | false           | If set to `true`, every INSERT/UPDATE/DELETE statement will block until the entire dataflow is refreshed.
 create_compaction_group_for_mv | false           | If set to `true`, RisingWave will create dedicated compaction groups when creating these materialized views.
 query_mode                     | auto            | A temporary config variable to force query running in either local or distributed mode. If the value is auto, the system will decide for you automatically.
 ...
```

Below is the detailed information about the parameters you may see after using the `SHOW ALL` command:

| Name                                         | Values or examples         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| :------------------------------------------- | :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| implicit\_flush                              | true/false                 | If set to `true`, every INSERT/UPDATE/DELETE statement will block until the entire dataflow is refreshed. In other words, every related table & MV will be able to see the write.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| create\_compaction\_group\_for\_mv           | true/false                 | If set to `true`, RisingWave will create dedicated compaction groups when creating these materialized views.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| query\_mode                                  | auto                       | A temporary config variable to force query running in either local or distributed mode. The default value is auto which means let the system decide to run batch queries in local or distributed mode automatically.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| extra\_float\_digits                         | 1                          | Set the number of digits displayed for floating-point values. See [here](https://www.postgresql.org/docs/current/runtime-config-client.html#:~:text=for%20more%20information.-,extra%5Ffloat%5Fdigits,-%28integer%29) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| application\_name                            | psql                       | Set the application name to be reported in statistics and logs. See [here](https://www.postgresql.org/docs/14/runtime-config-logging.html#:~:text=What%20to%20Log-,application%5Fname,-%28string%29) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| datestyle                                    | DMY                        | It is typically set by an application upon connection to the server. See [here](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-DATESTYLE) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| batch\_enable\_lookup\_join                  | true/false                 | Force the use of lookup join instead of hash join when possible for local batch execution.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| batch\_enable\_sort\_agg                     | true/false                 | Enable usage of sortAgg instead of hash agg when order property is satisfied in batch execution.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| batch\_enable\_distributed\_dml              | true/false                 | Enable distributed DML, allowing INSERT/UPDATE/DELETE statements to be executed in a distributed way, such as running on multiple compute nodes. Defaults to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| batch\_expr\_strict\_mode                    | true/false                 | Control whether to let the entire query fail or fill `NULL` values for expression evaluation failures.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| max\_split\_range\_gap                       | 8                          | The max gap allowed to transform small range scan into multi point lookup.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| search\_path                                 | "\$user", public           | Set the order in which schemas are searched when an object (table, data type, function, etc.) is referenced by a simple name with no schema specified. See [here](https://www.postgresql.org/docs/14/runtime-config-client.html#GUC-SEARCH-PATH) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| visibility\_mode                             | default                    | If `VISIBILITY_MODE` is `all`, we will support querying the latest uncommitted data, and consistency is not guaranteed between the tables.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| transaction\_isolation                       | read committed             | See [here](https://www.postgresql.org/docs/current/transaction-iso.html) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| query\_epoch                                 | 0                          | Select as of specific epoch. Sets the historical epoch for querying data. If 0, querying latest data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| timezone                                     | UTC                        | Session timezone. Defaults to UTC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| streaming\_parallelism                       | ADAPTIVE/0,1,2,...         | If `STREAMING_PARALLELISM` is non-zero, CREATE MATERIALIZED VIEW/TABLE/INDEX will use it as streaming parallelism.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| streaming\_enable\_delta\_join               | true/false                 | Enable delta join for streaming queries. Defaults to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| streaming\_enable\_bushy\_join               | true/false                 | Enable bushy join for streaming queries. Defaults to true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| streaming\_use\_arrangement\_backfill        | true/false                 | Enable arrangement backfill for streaming queries. Defaults to true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| streaming\_use\_snapshot\_backfill           | true/false                 | Enable snapshot backfill for streaming queries. Defaults to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| enable\_join\_ordering                       | true/false                 | Enable join ordering for streaming and batch queries. Defaults to true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| enable\_two\_phase\_agg                      | true/false                 | Enable two phase agg optimization. Defaults to true. Setting this to true will always set `FORCE_TWO_PHASE_AGG` to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| force\_two\_phase\_agg                       | true/false                 | Force two phase agg optimization whenever there's a choice between optimizations. Defaults to false. Setting this to true will always set `ENABLE_TWO_PHASE_AGG` to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| enable\_share\_plan                          | true/false                 | Enable sharing of common sub-plans. This means that DAG structured query plans can be constructed, rather than only tree structured query plans.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| force\_split\_distinct\_agg                  | true/false                 | Enable split distinct agg.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| intervalstyle                                | postgres                   | Set the display format for interval values. It is typically set by an application upon connection to the server. See [here](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-INTERVALSTYLE) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| batch\_parallelism                           | 0                          | If `BATCH_PARALLELISM` is non-zero, batch queries will use this parallelism.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| server\_version                              | 9.5.0                      | The version of PostgreSQL that Risingwave claims to be.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| server\_version\_num                         | 90500                      | The version of PostgreSQL that Risingwave claims to be.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| client\_min\_messages                        | notice                     | See [here](https://www.postgresql.org/docs/15/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| client\_encoding                             | UTF8                       | See [here](https://www.postgresql.org/docs/15/runtime-config-client.html#GUC-CLIENT-ENCODING) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| sink\_decouple                               | default                    | Enable decoupling sink and internal streaming graph or not.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| synchronize\_seqscans                        | true/false                 | See [here](https://www.postgresql.org/docs/current/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION) for details. Unused in RisingWave, support for compatibility.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| statement\_timeout                           | 3600                       | Abort query statement that takes more than the specified amount of time in sec. If `log_min_error_statement` is set to ERROR or lower, the statement that timed out will also be logged. The default value is 1 hour.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| lock\_timeout                                | 0                          | See [here](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-LOCK-TIMEOUT) for details. Unused in RisingWave, support for compatibility.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| cdc\_source\_wait\_streaming\_start\_timeout | 30                         | For limiting the startup time of a shareable CDC streaming source when the source is being created. Unit: seconds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| row\_security                                | true/false                 | See [here](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-ROW-SECURITY) for details. Unused in RisingWave, support for compatibility.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| standard\_conforming\_strings                | on                         | See [here](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STANDARD-CONFORMING-STRINGS) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| source\_rate\_limit                          | default/positive integer/0 | Set the maximum number of records per second per source, for each parallelism. This parameter is applied when creating new sources and tables with sources. <br /><br /> The value can be default, 0, or a positive integer. <ul><li>Set it to 0 will pause the source read for sources.</li><li>Set it to default will remove the rate limit.</li></ul>Setting this variable will only affect new DDLs within the session, but not change the rate limits of existing jobs. Use `ALTER` to change the rate limits in existing [sources](/sql/commands/sql-alter-source/#set-source-rate-limit) and [tables that have source](/sql/commands/sql-alter-table/#set-source-rate-limit). <br /><br /> Note that the total throughput of a streaming job is determined by multiplying the parallelism with the throttle rate. To obtain the parallelism value for a streaming job, you can refer to the `streaming_parallelism` runtime parameter in this table.                                                                                                                    |
| backfill\_rate\_limit                        | default/positive integer/0 | Set the maximum number of records per second per parallelism for the backfill process of materialized views, sinks, and indexes. This parameter is applied when creating new jobs, and throttles the backfill from upstream materialized views and sources. <br /><br /> The value can be default, 0, or a positive integer. <ul><li>Set it to 0 will pause the backfill.</li><li>Set it to default will remove the backfill rate limit.</li></ul>Setting this variable will only affect new DDLs within the session, but not change the rate limits of existing jobs. Use `ALTER` to change the backfill rate limits in existing [materialized views](/sql/commands/sql-alter-materialized-view#set-backfill-rate-limit) and [CDC tables](/sql/commands/sql-alter-table/#set-backfill%5Frate%5Flimit). <br /><br /> Note that the total throughput of a streaming job is determined by multiplying the parallelism with the throttle rate. To obtain the parallelism value for a streaming job, you can refer to the `streaming_parallelism` runtime parameter in this table. |
| dml\_rate\_limit                             | positive integer/0         | Set streaming rate limit (rows per second) for each parallelism for table DML. <ul><li>Set it to -1 will disable rate limit.</li><li>Set it to 0 will pause the DML.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| sink\_rate\_limit                            | positive integer/0         | Set sink rate limit (rows per second) for each parallelism for external sink. <ul><li>Set it to -1 will disable rate limit.</li><li>Set it to 0 will pause the sink.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| streaming\_over\_window\_cache\_policy       | full                       | Cache policy for partition cache in streaming over window. Can be `full`, `recent`, `recent_first_n` or `recent_last_n`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| background\_ddl                              | true/false                 | Run DDL statements in background.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| server\_encoding                             | UTF8                       | Show the server-side character set encoding. At present, this parameter can be shown but not set, because the encoding is determined at database creation time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| bytea\_output                                | hex                        | Set the output format for values of type bytea. Valid values are hex (the default) and escape (the traditional PostgreSQL format). The bytea type always accepts both formats on input, regardless of this setting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| iceberg\_engine\_connection                  | string                     | Specifies the connection information for the Iceberg engine tables. Create an Iceberg connection and set this variable before creating Iceberg engine tables. The format should be `schema_name.connection_name`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

If you just want to view a specific parameter's value, you can also use the `SHOW` command.

```sql theme={null}
SHOW parameter_name;
```

## How to configure runtime parameters?

You can use `SET` command or the `set_config()` function to change the setting of a runtime parameter.

The syntax of the `SET` command is:

```sql theme={null}
SET parameter_name { TO | = } { value | 'value' | DEFAULT};
```

Where `parameter_name` is the name of the parameter, and `value` or `'value'` is the new value of the parameter. `DEFAULT` can be written to specify resetting the parameter to its default value.

For details about the `set_config()` function, see [System administration functions](/sql/functions/sys-admin#set-config), and for details about the `SET` command, see [SET](/sql/commands/sql-set).

<Note>
  `SET` applies only to the current session.
</Note>

You can also use the [ALTER SYSTEM SET](/sql/commands/sql-alter-system) command to set a system-wide default value for a runtime parameter. This configuration will then be applied to every new session.

<Note>
  `ALTER SYSTEM SET` takes effect in new sessions. The value of the runtime parameter remains unchanged in the current session.
</Note>

```sql Syntax theme={null}
ALTER SYSTEM SET session_param_name TO session_param_value;
```
