0

Recently in our team, we had a requirement to paginate a set of content. Where we decided to go with jQuery Database table pagination. i.e.

  1. Fetch the whole content with one DB call
  2. Paginate using jQuery Database table (most likely like a client side pagination)

My concern here is, we are holding the whole object in the memory for pagination which would affect performance.

My alternative here is to hit the database using offset and max for each pagination, here DB hit might be another concern.

So my question here is Which is the best approach for pagination considering performance as the main factor?

Holding the whole content in memory or hitting the DB for each page ?

  • i have same issue with you what jquery client side pagination did you use i use the common one found here http://flaviusmatis.github.io/simplePagination.js/ – guradio Feb 02 '16 at 06:07
  • 1
    I also have the same issue my first approach was jquery but due to the huge data user experience was not good because page takes too much time to load but on the other hand searching was fast as all data is in client side and server is free but due to page load issue I ended up doing `offset` and `limit` approach server side it works well currently but for every search I have to fetch data from server but it better for me then jquery. – singhakash Feb 02 '16 at 06:11
  • @guradio I am using jQuery Datatable's pagination – Suganthan Madhavan Pillai Feb 02 '16 at 06:12
  • @singhakash, of course, if the number of elements increases `client side` pagination would not be a right approach I guess – Suganthan Madhavan Pillai Feb 02 '16 at 06:14
  • 1
    Same question here http://stackoverflow.com/questions/407878/pagination-server-side-or-client-side – starcorn Feb 02 '16 at 18:52

0 Answers0