我很好奇为什么Redis是这样设计的。这是出于性能考虑吗?或者仅仅限制数据库名称?
可在redis.conf
中配置# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
databases 16
然而,Redis的创建者不建议再使用SELECT命令。