MongoDB - paging -


when using mongodb, there special patterns making e.g. paged view? blog lists 10 latest posts can navigate backwards older posts.

or 1 solve index on e.g. blogpost.publishdate , skip , limit result?

using skip+limit not way paging when performance issue, or large collections; slower , slower increase page number. using skip requires server walk though documents (or index values) 0 offset (skip) value.

it better use range query (+ limit) pass in last page's range value. example if sorting "publishdate" simple pass last "publishdate" value criteria query next page of data.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -