Skip to content

Commit c16d29a

Browse files
committed
add limit to databases
1 parent 95b7425 commit c16d29a

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+
!!! note
5+
6+
Valkey supports a maximum of **16 logical databases**, indexed from `0` to `15`. This is a hard limit and should be considered when designing applications.
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`, `SWAPDB` or `RANDOMKEY` 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)