# Enabling In-Memory Pessimistic Lock

+ Enable in-memory pessimistic lock feature dynamically

```
tidb> SET CONFIG TIKV ~!@pessimistic-txn.pipelined@!~='true';
tidb> SET CONFIG TIKV ~!@pessimistic-txn.in-memory@!~='true';
```

-------------------------------------------------------------
You can dynamically turn on and off the in-memory pessimistic lock feature online.

```
> SET CONFIG TIKV pessimistic-txn.pipelined='true';
> SET CONFIG TIKV pessimistic-txn.in-memory='true';
```

We can also configure TiKV by modifying the configuration file. However, it requires you restart the TiKV nodes to take effect, e.g. :

```
[pessimistic-txn]
pipelined = true
in-memory = true
```