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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:32:17+00:00 2026-06-02T10:32:17+00:00

I have to store 2 million codes, being every code a string of fixed

  • 0

I have to store 2 million codes, being every code a string of fixed length 11. Every code has a boolean attribute called ‘used’, which marks the code as used or not (!). The amount of codes will be the same forever (no Create codes, no Delete codes, no Update codes) and the only update action would be to the used attribute of existing codes.

Every time a user enters a code on a web form, I have to search that code, check whether it has been used and if not, mark it as used.

There will be lots of users entering codes (up to 50 concurrently, yeah, that’s lots to me!) so I wonder what would be a good approach to make my webapp not suck of slowness.

Is this feasible with postgres (the DBMS I like the most)? What feature of postgres should I explore further? Indices?

Is this kind of task best performed by nosql? Maybe redis?

I’m going to use a cloud server (rackspace). What amount of ram should I put into it? There will be other stuff happening to the database, but nothing of importance in comparison? I’m guessing 1GB.

What other things should I research?

I don’t want anyone doing any research for me, just need some pointers so I can further investigate this issue.

Thanks!

  • 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-02T10:32:21+00:00Added an answer on June 2, 2026 at 10:32 am

    yes a SQL database will do this.

    create a table with at least two columns, used_flag and code

    add indexes to the code.

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

Sidebar

Related Questions

I have a 3D point clouds with million of points. I want to store
In my place where I work, used to have files with more than million
I have a table that has reached nearly 3 million records. While I appreciate
We have to store approximately 13 million files and perform some standard operations on
I have a table that has about 1/2 million records in it. Each month
I have to store millions of entries in a database. Each entry is identified
We have a table in which we store millions of small BLOBs (2-10kb). And
I have to store more than 100 millions of key-values in my HashMultiMap (key
I have to store more than 100 millions of key-values in my HashMultiMap (key
I have to store more than 100 millions of key-values in my HashMultiMap (key

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.