Server-side processing for table with content not sourced from database and SQL joins

Server-side processing for table with content not sourced from database and SQL joins

jtaylorjtaylor Posts: 3Questions: 0Answers: 0

I have an application where I am currently building the tables first and then applying DataTables after the tables are created. While this method works, I feel it is not ideal in terms of performance as I am loading 4 separate tables, each with 500-1000 rows. The page takes a long time to render before DataTables are even applied. I've looked through all of the documentation trying to figure out how to load only the first 10 rows for each table and then query the server for additional data, but none of the examples match my situation. Each of the 4 tables is similar in that the first few columns of each contain either checkboxes or graphic icons (edit/delete/etc.) and the queries used to populate the tables are complex and involve multiple joins and sub-selects. All of the examples I have found for server-side processing involve pulling data without SQL joins and do not allow for any content not sourced from the database. Has anyone used DataTables in the way I am describing and, if so, would you be able to point me in the right direction? Many thanks in advance!

Replies

  • jtaylorjtaylor Posts: 3Questions: 0Answers: 0

    Any ideas?

  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin

    Server-side processing can have a data source from anything you want. Typically it makes sense to use SQL since the SQL engine is specifically designed and optimised to perform the operations required, but you could if you want perform those operations yourself on a flat file, XML or anything else.

    As long as the data returned matches what DataTables requires then, as I say, you can use anything.

    Allan

This discussion has been closed.