We face code quality issues because of inline mysql queries. Having self-written mysql queries really clutters the code and also increases code base etc.
Our code is clu
Create store procedures for all queries, and replace the var sql = "SELECT..."
for calling the procedures like var sql = "CALL usp_get_packages"
.
This is the best for performance and no dependency breaks on the application. Depending on the number of queries may be a huge task, but for every aspect (maintainability, performance, dependencies, etc) is the best solution.