Syntax
Parameters
The number of key-value pairs to insert. Must be greater than
0.Return value
Returns a string describing the result:Errors
| Condition | Error message |
|---|---|
| Wrong number of arguments | (error) wrong number of arguments for 'BENCH' |
n is zero or negative | (error) invalid number |
Examples
Key and value naming
BENCH inserts keys using a fixed pattern:
| Index | Key | Value |
|---|---|---|
| 0 | key0 | value0 |
| 1 | key1 | value1 |
| … | … | … |
| N-1 | keyN-1 | valueN-1 |
expires_at = 0).
Notes
Because
BENCH inserts many keys rapidly, it is a good way to trigger hash table resizes. Monitor the Resizes and Load Factor fields in INFO output before and after a large BENCH run to observe dynamic resizing.