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

  • Home
  • SEARCH
  • 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 4090952
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:18:15+00:00 2026-05-20T19:18:15+00:00

The question: What solution or tips would you have to deal with a very

  • 0

The question:
What solution or tips would you have to deal with a very large (multi terabytes) database indexed on strong hashes with high redundancy?

Some kind of inverted storage?

Is there something that could be done with Postgres?

I am ready to roll my own storage if needed.

(Hint: Must be open source, no Java, must run on Linux, must be disk-based, C/C++/Python preferred)

The details:

I need to create a very large database where each record has:

  • some arbitrary meta data (some text
    fields) including some primary key
  • one hashes (128 bits hash, strong MD5-like)

The volume of records is what I would qualify as quite large: several 10 to 100’s billions).
There is a significant redundancy of hashes across rows (over 40% of the records have their hash shared with at least another record, some hash exist in 100K records)

The primary usage is to lookup by hash, then retrieve the metadata.
The secondary usage is to lookup by primary key, then retrieve the metadata.

This is an analytics-type database, so the overall load is medium, mostly read, few writes, mostly batched writes.

The current approach is to use Postgres, with an index on the primary key and an index on the hash column. The table is loaded in batch with the index on the hash turned off.

All indexes are btrees.
The index on the hash column is growing huge, as big or bigger than the table itself. On a 120 GB table it takes about a day to recreate the index. The query performances are quite good though.

The problem is that the projected size for the target database will be over 4TB based on tests with a smaller data set of 400GB representing about 10% of the total target. Once loaded in Postgres, over 50% of the storage is unfortunately being used by the SQL index on the hash column.

This is way too big. And I feel that the redundancy in hashes is an opportunity for storing less.

Note also that while this describes the problem, there are a few of these tables that needs to be created.

  • 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-20T19:18:16+00:00Added an answer on May 20, 2026 at 7:18 pm

    You could create a table with only id and Hash, and your other data with index, Metadata, and hashId. Doing so, you can prevent writing the same hash up to 100k times in the table.

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

Sidebar

Related Questions

Probably a long question for a simple solution, but here goes... I have a
I have a solution with other 70 projects into it. My question is :
I've got a question about references between projects in a solution. Most of my
I was reading a question about c# code optimization and one solution was to
As kind of a followup to this question I've gotten a solution working on
Kind of a basic question but I'm having troubles thinking of a solution so
In this question superwiren asks about the pitfalls for converting a .net 2.0 solution
This is a follow-up to the question: Should the folders in a solution match
In a previous question about overriding Time.now , I was working toward a solution
This is probably a simple question but I can't seem to find the solution.

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.