= 1"0.0 Return Value" />



English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Dbsize Command

Redis Server

The Redis Dbsize command is used to return the number of keys in the current database.

Syntax

The basic syntax of the redis DBSIZE command is as follows:

redis 127.0.0.1:6379> DBSIZE

Available Version

>= 1.0.0

Return Value

The number of keys in the current database.

Online Examples

redis 127.0.0.1:6379> DBSIZE
(integer) 5
redis 127.0.0.1:6379> SET new_key "hello_moto"     # Try adding a key
OK
redis 127.0.0.1:6379> DBSIZE
(integer) 6

Redis Server