• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Pagination in MongoDB

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

for pagination - Skip and limit vs find and limit ??? Which one would be the best choice ???

Case#1 - Paginate using primary key

Case #2 - Paginate using some other column

Thanks.
 
Greenhorn
Posts: 26
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Joseph,
I am not expert of MongoDB but trying to reply as per my knowledge.
* Find returns the cursor, which may have single or multiple records as per your search query.
* Skip and Limit is used for server side pagination.

As per my knowledge "skip and limit" should be used for pagination.

Regards,
Vikas
reply
    Bookmark Topic Watch Topic
  • New Topic