Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

Commonmark migration
Source Link

There are two kinds of paging:

  1. Via limit and skip , just like @milan proposed.

    Via limit and skip , just like @milan proposed.

  2. Via range query:

    Via range query:

    db.items.find({created: {$gt: startDate, $lt: endDate})

db.items.find({created: {$gt: startDate, $lt: endDate})

Range queries will work faster then skip, because they are no need to move towards 'skip' item.

Look into related thread as well.

For your case if you have only next/prev buttons range paging should be good option.

There are two kinds of paging:

  1. Via limit and skip , just like @milan proposed.
  2. Via range query:

db.items.find({created: {$gt: startDate, $lt: endDate})

Range queries will work faster then skip, because they are no need to move towards 'skip' item.

Look into related thread as well.

For your case if you have only next/prev buttons range paging should be good option.

There are two kinds of paging:

  1. Via limit and skip , just like @milan proposed.

  2. Via range query:

    db.items.find({created: {$gt: startDate, $lt: endDate})

Range queries will work faster then skip, because they are no need to move towards 'skip' item.

Look into related thread as well.

For your case if you have only next/prev buttons range paging should be good option.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

There are two kinds of paging:

  1. Via limit and skip, just like @milan proposed.
  2. Via range query:

db.items.find({created: {$gt: startDate, $lt: endDate})

Range queries will work faster then skip, because they are no need to move towards 'skip' item.

Look into related thread thread as well.

For your case if you have only next/prev buttons range paging should be good option.

There are two kinds of paging:

  1. Via limit and skip, just like @milan proposed.
  2. Via range query:

db.items.find({created: {$gt: startDate, $lt: endDate})

Range queries will work faster then skip, because they are no need to move towards 'skip' item.

Look into related thread as well.

For your case if you have only next/prev buttons range paging should be good option.

There are two kinds of paging:

  1. Via limit and skip, just like @milan proposed.
  2. Via range query:

db.items.find({created: {$gt: startDate, $lt: endDate})

Range queries will work faster then skip, because they are no need to move towards 'skip' item.

Look into related thread as well.

For your case if you have only next/prev buttons range paging should be good option.

Source Link
Andrew Orsich
  • 53.8k
  • 17
  • 142
  • 134

There are two kinds of paging:

  1. Via limit and skip, just like @milan proposed.
  2. Via range query:

db.items.find({created: {$gt: startDate, $lt: endDate})

Range queries will work faster then skip, because they are no need to move towards 'skip' item.

Look into related thread as well.

For your case if you have only next/prev buttons range paging should be good option.

lang-js

AltStyle によって変換されたページ (->オリジナル) /