为什么Redis有数据库名称的数字键,为什么这些上限为16?

  • 本文关键字:Redis 数据库 数字 redis
  • 更新时间 :
  • 英文 :


我很好奇为什么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命令。

最新更新