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 8304837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:56:51+00:00 2026-06-08T17:56:51+00:00

I am having a following model: | string (unique key) | about 10 other

  • 0

I am having a following model:

| string (unique key) | about 10 other strings, that have all a fixed length and may be empty |

On commonly query is using the ‘unique key and see the other strings’. This should be fine using Redis.

But another query is ‘show me the keys where column n is empty’. I am not sure if Redis can handle this performant!?

  • 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-08T17:56:52+00:00Added an answer on June 8, 2026 at 5:56 pm

    To solve this in redis, you will need to maintain some meta data. One solution would be to add a set type key for each “column” that would hold the unique keys of all elements where that “column” is blank. Obviously, in your application logic, you will need to add and remove unique keys from these sets as you add and remove values in your main hash. This will be very fast, as the set operations sadd, srem and sismember are all O(1) for single items (i.e. not proportional to the size of the set). To get all keys where a “column” is empty, you can use smembers. At least, that’s how I’ve solved similar problems.

    (I put quotes around columns since in the redis model, they will be hash fields, not columns as you think of them in an RDBMS)

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

Sidebar

Related Questions

I have the following object model: class ObjectA{ public string Description {get;set;} } class
I have a model which has a required string property like the following: class
I have DB2 table having following structure CREATE TABLE DUMMY ( ID CHARACTER(10) NOT
I'm currently having following error message when executing a .sql file with about 26MB
I am having following issue with reading binary file in C. I have read
I have the following model Person in my UI MVC layer: public class Person
I'm having a problem modelling the following problem in JPA. I have a JPA
Say you have the following object: public class Address { public String Line1 {
I'm using MVVM in WPF in C#.NET. Say I have the following example model:
I am having the following piece of code and i'm surprised that it's giving

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.