Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Redis Essentials

You're reading from   Redis Essentials Harness the power of Redis to integrate and manage your projects efficiently

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher Packt
ISBN-13 9781784392451
Length 230 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Multiple Redis databases

Redis comes with support for multiple databases, which is very similar to the concept in SQL databases. In SQL databases, such as MySQL, PostgreSQL, and Oracle, you can define a name for your databases. However, Redis databases are represented by numbers.

You learned in Chapter 4, Commands (Where the Wild Things Are), that we can switch between databases using the command SELECT <dbid>. Although multiple databases work fine, this has become a deprecated feature, so we do not recommend that you use it in production.

It has been deprecated because it is, in general, better to launch multiple Redis servers on the same machine rather than using multiple databases. Redis is single threaded. Thus, a single Redis server with multiple databases only uses one CPU core. On the other hand, if multiple Redis servers are used, it is possible to take advantage of multiple CPU cores.

Multiple databases make administration of Redis harder and may complicate performance and resource...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image