Server Side Processing - Not only for Giant Data Sets!
Server Side Processing - Not only for Giant Data Sets!
I see a great deal of discussion regarding appropriate need for server side processing. The consensus seems to be, that it is only useful for dealing with large data sets.
Consider a "summary" table with the following content:
1) The count of all rows where the name is Bob
2) The count of all rows where the name is Alice
3) the sum of all rows where the supervisor is Bob
.....
The real issue here, is that the data for the table cannot be generated by a SINGLE query. This is not something that will work with Joins
Think of this report as an excel pivot table. If anyone knows how to do this in a datatables supported query, I would love to hear from you.
Until then I am stuck using server side processing for my 5 row table
Replies
Server Side Processing is when the server returns a subset of the data set. That is, instead of returning 100,000 records, it only returns 100. In your example, you are not representing a server side issue, rather, a you seem to have a query issue.
You can call an ajax page whether you are using server side or not. Again, the difference is that in server side, you return only a portion of the records. In native dataTable processing, all records are returned. dataTables handles 1000s of records without a performance issue.
You probably want to craft your own ajax page (you don't need server side) and not rely on dataTables scripting for your query / ajax page.
I could have also done the above in 3 separate SQL statements, load the data into an class collection, then iterated over the collection to send the response.
Server Side not necessary.
Thank-you for the insightful response! That clears up some confusion.