3 ms·
I agree with you about the use of raw SQL when a query gets too complex. Often I find that the ORM is capable of expressing a query I have in mind, but it migh
by pplante 14y ago
I agree with you about the use of raw SQL when a query gets too complex. Often I find that the ORM is capable of expressing a query I have in mind, but it might do it inefficiently. Sometimes I will rewrite this using SQL. Usually what limits me is how much post processing I will have to do on the results to attain my desired goal.
Often I avoid putting any work on my db beyond filtering and grouping of results. Its typically much easier to scale out app/web servers than it is to scale out databases to support a heavy query workload.