In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about the number of key that can be stored in an example of redis. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
There are 16 db numbered 0-15 in redis by default, and db0 is used by default.
In reidis, how can data from different applications be separated from each other while stored on the same instance? It is equivalent to a mysql database, where different application data is stored in different databases.
In redis, the database is identified by an integer index, not by a database name. By default, a client connects to database 0. The following parameters in the redis configuration file control the total number of databases:
Databases 16
You can switch to a different database with the following command
Select 1
Ps: when you are in a redis cluster, you cannot use the select command because redis clusters only support db0
Each database has its own space, so you don't have to worry about key conflicts.
In different databases, the same key gets its own value.
How many key can be saved in an instance of redis?
Officials say that a single case can handle key: 250 million, see link: https://redis.io/topics/faq, here are the exact words:
What is the maximum number of keys a single Redis instance can hold? And what the max number of elements in a Hash, List, Set, Sorted Set?Redis can handle up to 2 ^ 32 keys, and was tested in practice to handle at least 250 million keys per instance.Every hash, list, set, and sorted set, can hold 2 ^ 32 elements.In other words your limit is likely the available memory in your system.
The maximum size of a key or value is 512m.
The above is the number of key that can be saved in an instance of redis shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.