4 ms·
The purpose is performance. Let's say you're querying orders, and each order has a customer name in another table that you want to pull through. If you do a jo
by solumunus 3y ago
The purpose is performance.
Let's say you're querying orders, and each order has a customer name in another table that you want to pull through. If you do a join and include the customer name in the result set it's going to amount to a lot of repeated data that has to be sent across the network. Instead, you could receive two result sets, one with only the relevant customers and the other with the orders containing only the customer ID. The amount of data getting sent across the network will be massively reduced and you can still reference the customer names at the other end.
- amne 3y agoThis sounds like something the DB driver should be able to do and hide it, at least by default, from the user.