Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Pagination in MongoDB  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!