Redis Key spaces

  • Redis keyspace are just like name-space/package in java/schemas in database
  • This allows same key names to exist in multiple keyspaces
  • keySpace index always starts with zero – 0
  • You can change the Keyspace by using command select <index>
  • Default keyspace is select 0
  • You can use command keys to print all the keys in the keyspace
  • You cannot link the keys from one keyspace to another

In below example keys created in key-space 0 does not exist in key-space 1 and vice versa

Print all the keys in a key-space

Deleting all the key in a key-space

How to check the count of keyspace

Leave a Comment