|
|
|
|
|
by uhoh-itsmaciek
2458 days ago
|
|
>I'm not sure about "non-trivial amount of data" - especially if we're talking about a single row (single user) here? I suppose there might be a few blolbs of large json documents?
>
>And I'm not sure I understand "repeating information in query results" - surely we're talking about receiving a query, transforming it and responding with the data? For a query like SELECT u.* , c.* FROM users u INNER JOIN comments c
ON u.id = c.user_id WHERE u.id = <...>
above, the user information is repeated for each comment, e.g., u.id, u.name, c.id, c.text
1 Bob 1 you are right
1 Bob 2 you are wrong
1 Bob 3 you are right again
If you have a hundred comments, and many user fields, this can be a significant amount of data to pass around. Or maybe this is not what you meant? I feel like we may be talking past each other. Can you give an example of what you think the ideal sql should be for "give me user with id = 1 and all their comments"? |
|
I didn't consider the kind of expansion you're alluding to - on the other hand i can't ever remember seeing an indication that the amount of data returned is an issue with app performance.
But I've certainly seen the number of round-trips result in real issues. And complicated joins, for that matter.