News for hackers. Stuff that matters.
Re:MongoDB, count() and the big O by taf2 on Thursday November 24, 2011 @12:20AM (#3273210)
it does, if you change your pagination interface to only care if there are more results after this page...
Re:MongoDB, count() and the big O by cheald on Thursday November 24, 2011 @01:15AM (#3273362)
If your pagination interface is simply "Next", then why not skip the count all together, limit(N+1) documents, and offer the "Next" button if the result set is N+1 large?