华夏棋牌

目录 搜索
Cluster cluster addslots(集群 槽位) cluster count failure reports(集群计数掉落败申报) cluster countkeysinslot cluster delslots cluster failover cluster forget cluster getkeysinslot cluster info cluster keyslot(集群键槽) cluster meet cluster nodes(集群节点) cluster replicate(集群复制) cluster reset(集群重置) cluster saveconfig cluster set config epoch cluster setslot cluster slaves cluster slots readonly readwrite Connection auth echo ping quit select swapdb Geo geoadd geodist geohash geopos georadius georadiusbymember Hashes hdel hexists hget hgetall hincrby hincrbyfloat hkeys hlen hmget hmset hscan hset hsetnx hstrlen hvals HyperLogLog pfadd pfcount pfmerge Keys del dump exists expire expireat keys migrate move object persist pexpire pexpireat pttl randomkey rename renamenx restore scan sort touch ttl type unlink wait Lists blpop brpop brpoplpush lindex linsert llen lpop lpush lpushx lrange lrem lset ltrim rpop rpoplpush rpush rpushx Pub/Sub psubscribe publish pubsub punsubscribe subscribe unsubscribe Scripting eval evalsha script debug script exists script flush script kill script load Server bgrewriteaof bgsave client getname client kill client list client pause client reply client setname command command count command getkeys command info config get config resetstat config rewrite config set dbsize debug object debug segfault flushall flushdb info lastsave monitor role save shutdown slaveof slowlog time Sets sadd scard sdiff sdiffstore sinter sinterstore sismember smembers smove spop srandmember srem sscan sunion sunionstore Sorted Sets zadd zcard zcount zincrby zinterstore zlexcount zrange zrangebylex zrangebyscore zrank zrem zremrangebylex zremrangebyrank zremrangebyscore zrevrange zrevrangebylex zrevrangebyscore zrevrank zscan zscore zunionstore Strings append bitcount bitfield bitop bitpos decr decrby get getbit getrange getset incr incrby incrbyfloat mget mset msetnx psetex set setbit setex setnx setrange strlen Transactions discard exec multi unwatch watch
文字

KEYS pattern

自1.0.0起可用。

时间严重年夜度:华夏棋牌 O(N),其中N是数据库中的键的数目,假定数据库中的键名和给定形式的长度无限。

前往一切婚配的键pattern

虽然此操作的时间严重年夜度为O(N),但常数时间相当短。例如,运转在入门级条记本电脑上的 Redis 可以在40毫秒内扫描一百万个密钥数据库。

正告:将 KEYS 视为仅应在临盆情形中审慎应用的敕令。在对年夜型数据库推行它时能够会破损性能。此敕令用于调试和特殊操作,例如更改您的密钥空间结构。请勿在老例应用法式模范模范代码中应用KEYS。假定您正在寻觅一种措施在您的密钥空间的子集中查找密钥,请推敲应用 SCAN 或荟萃。

华夏棋牌支持的全局项目形式:

  • h?llo matches hello, hallo and hxllo

  • h*llo matches hllo and heeeello

  • h[ae]llo matches hello and hallo, but not hillo

  • h[^e]llo matches hallo, hbllo, ... but not hello

  • h[a-b]llo matches hallo and hbllo

\假定您想逐字婚配,请应用转义特殊字符。

前往值

阵列回复:密钥婚配列表pattern

例子

redis>  MSET one 1 two 2 three 3 four 4 "OK" 

redis>  KEYS *o* 1) "one" 2) "four" 3) "two" 

redis>  KEYS t?? 1) "two" 

redis>  KEYS * 1) "three" 2) "one" 3) "four" 4) "two"

上一篇: 下一篇: