UpTheCreek
UpTheCreek

Reputation: 32381

What is the benefit of having the separate numbered databases in redis?

I've been wondering why redis offers 16 'numbered' databases per instance. Could someone please explain the benefits of this, and the reason one might want to use multiple numbered databases on one server?

Upvotes: 0

Views: 170

Answers (1)

Tommaso Barbugli
Tommaso Barbugli

Reputation: 12031

Once convenient thing of databases is that you can flush them separately with FLUSHDB (while you cant flush all keys matching a pattern like 1*)

SORT and KEYS are also going to be faster if the keys you are interested are split in multiple dbs.

Upvotes: 2

Related Questions