Hi, Im using symfony doctrine with my database. my problem is when i look into the profiler, i see that my problem is within the query that needs to retrieve thousands of rows and pass it through datatable. How can i improve my query to load the page fast?
n t0.docs_id_id is a foreign or parent key, right? Think about what you really want returned - there will be another filter or even just pagination through LIMIT. Make sure you have t0.docs_id_id indexed, that will help with speed. Is the datatable the jsquery datatable? If so, this needs to be an ajax query, they're super simple once you know what you're doing. I can give you some examples. And datatables definitely use paging.
[QUOTE="..And datatables definitely use paging.[/QUOTE] Datatables also support back-end paging. Use that for paging, otherwise, it's still loading the entire set.