Skip to content

Commit 929da13

Browse files
Document database limit (0–15) for SELECT command as a note (#339)
Addresses issue #338. The note is inserted after the sentence "New connections always use the database 0." to ensure it's visible early in the section. As this is my first PR please let me know if you'd like this phrased differently, thank you. --------- Signed-off-by: Dragos Andriciuc <[email protected]> Signed-off-by: Viktor Söderqvist <[email protected]> Co-authored-by: Viktor Söderqvist <[email protected]>
1 parent 362c6bc commit 929da13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

commands/select.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Select the Valkey logical database having the specified zero-based numeric index.
22
New connections always use the database 0.
33

4+
By default, Valkey provides 16 logical databases, indexed from `0` to `15`.
5+
You can increase this number by setting the `databases` parameter in the configuration file.
6+
This change must be made at startup and cannot be modified at runtime.
7+
48
Selectable Valkey databases are a form of namespacing: all databases are still persisted in the same RDB / AOF file. However different databases can have keys with the same name, and commands like [`FLUSHDB`](flushdb.md), [`SWAPDB`](swapdb.md) or [`RANDOMKEY`](randomkey.md) work on specific databases.
59

610
In practical terms, Valkey databases should be used to separate different keys belonging to the same application (if needed), and not to use a single Valkey instance for multiple unrelated applications.

0 commit comments

Comments
 (0)