> Thks for your help
> so for the feed query you would do something like that right ?
> db.feeds.find({ "time": {$lt: lastFeed.time} }).sort( { time : -1 } )
> .limit(20)
> On Wednesday, April 25, 2012 5:13:51 PM UTC+2, Sammaye wrote:
>> Time ranges. Twitter and fb both use time range paging for their feeds,
>> so you say sort by time desc and then limit by 20 and then get the ts of
>> the last object and use that as the skip range for the next 20. It works
>> well.
>> But skip() will be no problem on 1000 documents what it means by skip
>> being slow is when you start paging 1000000 documents.
>> On 25 April 2012 16:09, Pierre Guillaume Herveou <pgherv...@gmail.com>wrote:
>>> Hi guys, I need your advice for different kind of pagings
>>> I need to implement paging for something similar to a twitter list of
>>> message in my app. I don't expect user to scroll more than 3, 4 pages in
>>> normal usage.
>>> What do you advice for this kind of paging. I read on the doc that
>>> skip() could be quite slow for large collection
>>> I have also another kind of paging where user can perform a query on a
>>> certain type of collection (e.g collection of user filtered by user name)
>>> and I need to page this results as well.
>>> I don't expect queries to return more than 1000 or so document but I
>>> need to page them 10 by 10 on the app
>>> What would be appropriate as well for this kind of paging ?
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "mongodb-user" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/mongodb-user/-/PMy_**pWAxLDYJ<https://groups.google.com/d/msg/mongodb-user/-/PMy_pWAxLDYJ>
>>> .
>>> To post to this group, send email to mongodb-user@googlegroups.com.
>>> To unsubscribe from this group, send email to mongodb-user+unsubscribe@*
>>> *googlegroups.com <mongodb-user%2Bunsubscribe@googlegroups.com>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/mongodb-user?hl=en<http://groups.google.com/group/mongodb-user?hl=en>
>>> .
>> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mongodb-user/-/atVoGpBIbA4J.
> To post to this group, send email to mongodb-user@googlegroups.com.
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mongodb-user?hl=en.