logoalt Hacker News

hatefulheartlast Saturday at 4:17 PM2 repliesview on HN

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?


Replies

nfw2yesterday at 9:29 PM

1. Because you referred to lines of code as the way to suggest SQL is obvious better, not performance

2. No, my point was that talking about code clarity was a distraction because to talk about lines of code as a determinant of performance is clearly wrong.

3. Tangentially, yes, if some behavior takes 100 lines of general purpose code to express, I would rather read it in the general purpose language than in SQL even if the SQL was fewer lines. It's hard to imagine why this would ever be the case though.

airstrikelast Saturday at 4:36 PM

The correct SQL query will be more performant than what? The correct ORM call will build the same correct SQL query.

ORM is ultimately SQL

show 1 reply