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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:10:52+00:00 2026-05-28T08:10:52+00:00

I am storing key-value pairs in a Redis database via the Redis-py client. All

  • 0

I am storing key-value pairs in a Redis database via the Redis-py client. All keys are unique, there are no duplicates. Here’s an example :

key = 133735570
value = {"key":133735570,"value":[[141565041,1.2],[22592300,1.0],[162439394,1.0],[19397942,1.0],[79996146,1.0],[84352985,1.0],[123276403,1.0],[18356816,1.0],[113839687,1.0],[16235789,1.0],[144779115,1.0],[94628304,1.0],[134973120,1.0],[138501363,1.0],[34351681,1.0],[80202522,1.0],[81561595,1.0],[18913677,1.0],[130488590,1.0],[128208311,1.0],[93912155,0.5]]}

Would adding a hash (same as the key name) improve performance? For example,

key = 133735570
hash = 133735570
value = {"key":133735570,"value":[[141565041,1.2],[22592300,1.0],[162439394,1.0],[19397942,1.0],[79996146,1.0],[84352985,1.0],[123276403,1.0],[18356816,1.0],[113839687,1.0],[16235789,1.0],[144779115,1.0],[94628304,1.0],[134973120,1.0],[138501363,1.0],[34351681,1.0],[80202522,1.0],[81561595,1.0],[18913677,1.0],[130488590,1.0],[128208311,1.0],[93912155,0.5]]}

My requirement is to look-up keys so as to retrieve the corresponding values from it.

  • 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-05-28T08:10:53+00:00Added an answer on May 28, 2026 at 8:10 am

    You can try to store your key-value pairs (value part in your example) within hash data structure (where key part of your pair would be stored as hash field and value part as hash value; check out HMSET) which is more flexible for data manipulation and might consume less memory than plain value strings.

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

Sidebar

Related Questions

I'm storing a lot of sorted ~10 row 2 column/key value pairs in ASP.NET
Simple situation - read a json file discover all key-value pairs compare key-value pairs
I have 5 million key-value pairs. Kindly suggest a relevant data structure for storing
Here's what I'm trying to do: - Retrieve a Map of key-value pairs from
I saw some code which was storing key,value pairs in 2 arrays. The only
I have a table where one of the columns are storing key/value pairs separated
I am evaluating nosql stores for storing key/value pairs (for a part of application),
What is the best way of storing key-value pairs of Strings in a file
I want to create a top 5 list of unique key value pairs sorted
I need a memory-efficient data structure for for storing about a million key--value pairs,

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.