Luis Rodriguez-Galvan
asked on
Faster Quieries
We have a LAMP Cloud App in PHP 7 using MySQL. We use nested queries and it takes a long time to get to the desired records.
Among the options we are looking at to speed up the queries are:
Change to another Database (Please advise which)
Optimize the code
I'll appreciate letting me know what to do to speed up the queries.
Thanks
Luis R
Among the options we are looking at to speed up the queries are:
Change to another Database (Please advise which)
Optimize the code
I'll appreciate letting me know what to do to speed up the queries.
Thanks
Luis R
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you often do queries over and over (with mostly the same resulting content), storing the intermediate results in a memcache may help there as well.
If you have differing requirements for parts of the code, nginx with several instances of php-fpm can help there as well,
if you can select on url that is, creating several backend php-fpm instances, is easy to access from nginx.
If you have differing requirements for parts of the code, nginx with several instances of php-fpm can help there as well,
if you can select on url that is, creating several backend php-fpm instances, is easy to access from nginx.
Now to the tuning of what you have: There isn't a silver bullet to tuning systems. People make their entire careers out of nothing but tuning.
I would first look at the execution plan to make sure it is accessing tables and indexes the way you think it should:
https://dev.mysql.com/doc/refman/8.0/en/explain.html
You mention nested queries. Try to make sure you aren't accessing the same large tables over and over. Try to get everything you need from them once.