Hacks no. But I always start with an explain to understand how the query is done. Most likely you can speed it up with some proper indexing
Can you show what you have now? Maybe we can spot some things that can be optimized
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This is a more theoretical question. I have multiple data tables: users, user_details, projects, project_details,...
I need to make an overview page, where I would paginate by users. In past, I would create eloquent relationships, and pull the data. But, on this overview page, sorting needs to be done on columns, which are spread across every mentioned table.
Because of that, I decided to use joins. Because of that, the query time became very long. Are there any hacks, or tips, that you experienced guys would know to speed up the query? I have used the select command, to exclude some columns, but the time did not change as much. And, I have also played with the pagination number.
Any tips are greatly appreciated.
Hacks no. But I always start with an explain to understand how the query is done. Most likely you can speed it up with some proper indexing
Can you show what you have now? Maybe we can spot some things that can be optimized
Please or to participate in this conversation.