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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:36:43+00:00 2026-06-02T07:36:43+00:00

Background: I have am taking over an application (original engineer is leaving) that act

  • 0

Background: I have am taking over an application (original engineer is leaving) that act as caching layer of some relatively slow backend services. Because it’s RESTful style URL, each URL is unique. The application uses MongoDb as the storage for cache, and uses hash value as the cache. Although hash code should be pretty unique, but it is not unique.

Question: I was told the reason to use hash code (instead of the url) was because MongoDb’s _id field has limit on length, but I can’t find any document on that. All I can find in the MongoDb documentation is “_id field can be anything other than array as long as it’s unique”. Is it true that MongoDb’s _id field has length limit? If so what is the limit size?

The application is written in Java. Oh, and I am new to MongoDb.

  • 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-02T07:36:45+00:00Added an answer on June 2, 2026 at 7:36 am

    There is a limit to the length of the field to be indexed, which is 1024 bytes. That’s a limitation on index entry size rather than document field size which are limitated at ~16MB (the maximum size of a complete document).

    For performance reasons you do not really want large field values for indexed fields as comparisons against such big values are considerably slower. Also remember that every index maintains copies of the values being indexed so it would require significant amounts of memory. That in turns means more frequent disk access to swap virtual memory pages in and out of memory which again has a negative impact on performance.

    So yes, limited to 800 bytes.

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

Sidebar

Related Questions

I'm going to learn asp.net by taking a institute coaching. I have background of
Background I have a dimension table that has a single record for each day.
Background: I have a ListView / GridView with several columns. In some situations, only
Background I have a custom collection that is binded to the datagridview this.datagridview.DataSource =
Background: I have a WCF service deployed on my local machine that in turns
Background: I have an application with athletes, each of these athletes (Athlete model) can
and thanks for taking a look at the question. The background I have several
Background I have a few scripts that run as part of my build process
Background Currently I have a C# Silverlight business application which uses RIA Services. The
Background: I have this with rollup query defined in MySQL: SELECT case TRIM(company) when

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.