mercredi 27 mai 2020

Multiple database access vs joining on 2 tables performance

Tables are:

Users (id, name)
Friends (id1, id2)

I am getting the IDs of the friends of a particular user from Friends table and making multiple access to get the friend's name (for each of these friends IDs i make an access to the user table to get the name)

The simple way is doing one access and Joining the 2 tables, but it will conflict with the structure of the server code.

Is there major performance drop when making multiple access in large scale database or it is not a problem since the these accesses are from the server and not the client ?




Aucun commentaire:

Enregistrer un commentaire