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

# SET RW_IMPLICIT_FLUSH

> The `RW_IMPLICIT_FLUSH` configuration option controls the behavior of implicit flushes after batch operations.

## Syntax

```sql theme={null}
SET RW_IMPLICIT_FLUSH = { true | false };
```

## Purpose

The `FLUSH` command commits any pending data changes and forces RisingWave to persist updated data to storage, which guarantees subsequent reads can access the latest data. See details in [FLUSH](/sql/commands/sql-flush).

However, when the `RW_IMPLICIT_FLUSH` option is enabled, explicit use of the `FLUSH` command is not required in most cases, as data changes are implicitly flushed and made visible after batch operations.

## Behavior

* When `RW_IMPLICIT_FLUSH` is set to `true`,
  * Data changes through `INSERT`, `UPDATE`, and `DELETE` are implicitly flushed and made visible after batch operations.
  * RisingWave ensures that data consistency and visibility are maintained similar to traditional databases, where read-after-write guarantees are provided.
  * [`DML_WAIT_PERSISTENCE`](/sql/commands/sql-set-dml-wait-persistence) is ignored.
* When `RW_IMPLICIT_FLUSH` is set to `false` (default behavior),
  * RisingWave does not guarantee read-after-write consistency — a write may not be visible to subsequent reads immediately.
  * You can call `FLUSH` explicitly after batch operations to immediately persist the changes to storage.
  * Alternatively, you can enable [`DML_WAIT_PERSISTENCE`](/sql/commands/sql-set-dml-wait-persistence) to make DML wait for checkpoint persistence without triggering `FLUSH`.

## Example

```sql theme={null}
-- Enable RW_IMPLICIT_FLUSH
SET RW_IMPLICIT_FLUSH TO true;

-- Perform batch operations
INSERT INTO users (id, name) VALUES (1, 'Alice'), (2, 'Bob'), (3, 'Charlie');
UPDATE users SET name = 'David' WHERE id = 2;
DELETE FROM users WHERE id = 3;

-- Data changes are implicitly flushed and immediately visible
SELECT * FROM users;
```
