Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:04:35+00:00 2026-06-14T12:04:35+00:00

At my current project I actively use redis for various purposes. There are 2

  • 0

At my current project I actively use redis for various purposes. There are 2 redis databases for current application:

  1. The first one contains absolutely temporary data: how many users are online, who are online, various admin’s counters. This db is cleared before the application starts by start-up script.
  2. The second database is used for persistent data like user’s ratings, user’s friends, etc.

Everything seems to be correct and everybody is happy.

However, when I’ve started implementing a new functionality in my application, I discover that I need to intersect a set with user’s friends with a set of online users. These sets stored in different redis databases, and I haven’t found any possibility to do this task in redis, except changing application architecture and move all keys into one namespace(database).

Is there actually any way to perform some command in redis using data from multiple databases? Or maybe my use case of redis is wrong and I have to perform a fix of system architecture?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:04:37+00:00Added an answer on June 14, 2026 at 12:04 pm

    There is not. There is a command that makes it easy to move keys to another DB:

    http://redis.io/commands/move

    If you move all keys to one DB, make sure you don’t have any key clashes! You could suffix or prefix the keys from the temp DB to make absolutely sure. MOVE will do nothing if the key already exists in the target DB. So make sure you act on a ‘0’ reply

    Using multiple DBs is definitely not a good idea:

    A Quote from Salvatore Sanfilippo (the creator of redis):

    I understand how this can be useful, but unfortunately I consider
    Redis multiple database errors my worst decision in Redis design at
    all… without any kind of real gain, it makes the internals a lot
    more complex. The reality is that databases don’t scale well for a
    number of reason, like active expire of keys and VM. If the DB
    selection can be performed with a string I can see this feature being
    used as a scalable O(1) dictionary layer, that instead it is not.

    With DB numbers, with a default of a few DBs, we are communication
    better what this feature is and how can be used I think. I hope that
    at some point we can drop the multiple DBs support at all, but I think
    it is probably too late as there is a number of people relying on this
    feature for their work.

    https://groups.google.com/forum/#!msg/redis-db/vS5wX8X4Cjg/8ounBXitG4sJ

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our current project does not use Hibernate (for various reasons) and we are using
As part of my current project I've been tasked with collecting URL's for various
my current project is based on Entity Framwork code-first. I have three types: Task,
My current project requires extensive use of bit fields. I found a simple, functional
Current project is an Mvc4 application, I had Ioc working and recently it just
My current project has version 1.6.3 of codeigniter framework. Now there is new release
My current project is about doing some changes in an already build web application
My current project is created for API Level 4 and I use custom implementation
Current project structure On my first spring mvc project, I am trying to get
My current project involves a legacy codebase which makes use of Django's models in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.