In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how redis data is stored, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
Where is the redis data stored?
First of all, we should understand that redis is a database, redis is an in-memory database, all the data is basically stored in memory and will be regularly refreshed to the hard disk by append or snapshot. Because redis is an in-memory database, the speed of reading and writing is very fast, so it is often used to cache data, pages, etc.
Data types commonly used in redis
The most commonly used data types in Redis are as follows:
String
Hash
List
Set
Sorted set
Pub/sub
Transactions
Type represents a value object. What data type is it?
Encoding is how different data types are stored within redis.
For example, type=string represents value to store an ordinary string, then the corresponding encoding can be raw or int, and if int represents the actual redis, the string is stored and represented as a numeric class internally, of course, provided that the string itself can be represented by a numeric value, such as a string like "123,456".
The vm field needs to be specified here. Only when the virtual memory feature of Redis is enabled, this field will actually allocate memory. This function is disabled by default, which will be described later. From the figure above, we can find that it is a waste of memory for Redis to use redisObject to represent all key/value data. Of course, these memory management costs are mainly to provide a unified management interface for different data types of Redis. The actual author also provides a variety of methods to help us save memory as much as possible.
The above is all the content of how redis data is stored, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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
CentOS 7 MySQL 5.7.10 Mongo 3.2.1 Nginx 1.8.0 PHP 5.5.31 Redis 3.0.6
© 2024 shulou.com SLNews company. All rights reserved.