redis DBSIZE command


  Translation results:

size

UK[saɪz] 美[saɪz]

n. Scale; size, size; glue, paste; huge, large amount

vt. Arrange according to size; change the size of; apply glue, sizing; apply paint

adj. Certain size

Third person singular: sizes Plural: sizes Present participle: sizing past tense: sized past participle: sized

redis DBSIZE commandsyntax

Function: Returns the number of keys in the current database.

Syntax: DBSIZE

Available versions:>= 1.0.0

Time complexity:O(1)

Return: The number of keys in the current database.

redis DBSIZE commandexample

redis> DBSIZE
(integer) 5
redis> SET new_key "hello_moto"     # 增加一个 key 试试
OK
redis> DBSIZE
(integer) 6

Home

Videos

Q&A