Reading around 10000 datasets / best practice?
Reading around 10000 datasets / best practice?
Hello - i have build a soluton which is reading around 10000 datasets from a mysql-DB and rendering an ejs-file with datatables -
Workflow:
* normal fullstack-app with routes / controllers / views
* read data in controller to an array and render this ejs-file with the array
(res.render('profile.ejs', { rows: result[0], user: req.user }))
* rendering the ejs-file with array
Is there some better / efficient way to handle this?
What is the "best practice" for such an amount of data?
I found something about server-side-processing (example with over 5Mio rows)
https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html
(but i think this is too much for my needs - and also when i see it right - with that solution i have no search-field / pagination / etc. what i would like to have)
Answers
For 10k records, you should get adequate performance with just client-side processing. If it is running slowly, this section of the FAQ should help, it discusses various techniques to improve performance,
Cheers,
Colin