SELECT index

    Select the Redis logical database having the specified zero-based numeric index. New connections always use the database 0.

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

    Since the currently selected database is a property of the connection, clients should track the currently selected database and re-select it on reconnection. While there is no command in order to query the selected database in the current connection, the output shows, for each client, the currently selected database.