| ▲ | nfw2 2 hours ago | ||||||||||||||||
The reason given to use raw SQL is for the performance not the perceived code clarity. | |||||||||||||||||
| ▲ | baq 2 hours ago | parent | next [-] | ||||||||||||||||
If you never used a CTE, maybe… The reason to use SQL is to get what you need out of a database. Performance is orthogonal to that. | |||||||||||||||||
| ▲ | hatefulheart 2 hours ago | parent | prev [-] | ||||||||||||||||
I’m not sure why you thought I meant code clarity and not performance? It’s clear in all cases the correct SQL query will be more performant. Confused at what you’re evening trying to say here. Are you suggesting that 100 lines of application layer code is easier to understand than 15 lines of SQL? | |||||||||||||||||
| |||||||||||||||||