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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:41:38+00:00 2026-06-12T21:41:38+00:00

I have a collection of posts (see the pseudo-json :-) ) : [ {title:First,created:2012-10-04

  • 0

I have a collection of posts (see the pseudo-json 🙂 ) :

[
  {"title":"First","created":"2012-10-04 01:00:00"},
  {"title":"Second","created":"2012-10-04 03:30:00"},
  {"title":"Third","created":"2012-10-02 02:00:00"}
]

I am in the “2012-10-04” posts page and I want to know if there are older posts, just for displaying a “next page” button.

I can think about a query like this:

db.posts.find({"created":{$lt:ISODate("2012-10-04")} }).limit(1);

I still have to try it, but I think it will work… actually my question is:

What about its performance? Will it run at the same speed with billions of documents in the collection?

  • 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-12T21:41:39+00:00Added an answer on June 12, 2026 at 9:41 pm

    Provided there’s an index on “created” that should scale relatively well assuming you will shard your billions of collections as needed. Regardless of what kind of queries you do they will take longer on a larger data set, index or not. It’s just that the performance profile of b-tree walks is significantly better than raw table scans.

    Your query is an open ended range query which is actually ideal in your case since it can return if it finds ANY document older than the specified date.

    In short, yes, this will perform adequately and will scale with sharding.

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

Sidebar

Related Questions

I have a collection of posts created by separate users in my database. Each
I have a collection of Post objects and I want to be able to
So I know there have been a couple of posts around about this topic,
Aright so I have a database with a collection of Posts with a column/property
I have the following code: // // POST: /PlayRoundHole/Create [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(FormCollection collection)
I have Collection List<Car> . How to compare each item from this collection with
Lets say I have collection of documents with specified longitude and latitude. type is
I'm planning to have collection of items stored in a TCollection. Each item will
for example I have collection foo of documents like that: {tag_cloud:[{value:games, count:10}, {value:girls, count:500}]}
I have Class and Student objects. Both have collection of another as property. Which

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.