All Products
Search
Document Center

Tair (Redis® OSS-Compatible):How much memory can each database in a Tair instance use? How do I switch between databases?

Last Updated:Mar 28, 2026

Each Tair (Redis OSS-compatible) instance has exactly 256 databases (DB0 to DB255), and this number cannot be changed. Databases are a form of namespacing: they share the same instance memory, so there is no per-database memory limit. All 256 databases together can use up to the total memory of the instance. Unused databases consume no additional resources and do not affect performance.

Switch between databases

Use the SELECT command to switch to a specific database:

SELECT <index>

For example, to switch to DB10:

SELECT 10

Cluster instance behavior

Tair cluster instances support multiple databases in both direct connection mode and proxy mode. Use proxy mode for better client compatibility. In direct connection mode, some clients — such as Jedis — may not support the SELECT command when they connect to cluster instances in direct connection mode.

Database isolation

Databases are logical separations within the same instance, not resource boundaries. To isolate different applications at the resource level, create separate Tair instances. For data storage, use DB0 by default.