- Although by
keys命令
orscan命令
you may find all the data having a Redis features, but they have some differences.
-
Command keys
because Redis is single-threaded, when it needs to provide other services, keys command causes the server to block; -
scan command
scan command solves the problem caused by the command keys, but the scan command to get the data have duplicate may need to do a client deduplication.