How to obtain the total number of keys in the cluster in redis cluster 1, the total number of all records in a table similar to mysql; 2, obtain part of data by PAGE like mysql ($ offset, $ limit; 3. Obtain the Data Type of the key, such as string and hash.
1. Obtain the total number of all keys in the cluster, similar to the total number of all records in the mysql table;
2. Obtain ($ offset, $ limit) part of data by PAGE like mysql;
3. Obtain the Data Type of the key, such as string and hash;
Reply content:
In a redis Cluster
1. Obtain the total number of all keys in the cluster, similar to the total number of all records in the mysql table;
2. Obtain ($ offset, $ limit) part of data by PAGE like mysql;
3. Obtain the Data Type of the key, such as string and hash;
KEYS *
Get all the keys and then count them by yourself.
- Redis is a cache database, so there is no need for paging or that function.
- Type
Your-key