Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should left outer joins be avoided in DB2

We are having a debate in our company. I use left outer joins quit frequently. I was told by another programmer that there is too much over head and I should not use them. Example, Lets say I have two tables, they would rather me hit the database twice get the information I need from each table store it in memory and join the data on the java side, instead of just doing a left outer join. I think this is absurd and would be bad for performance. Am I wrong

like image 392
Doug Avatar asked Jan 22 '23 12:01

Doug


1 Answers

You are not wrong. Using a join is most likely to be more efficient. This is what databases are good at.

like image 168
Mark Byers Avatar answered Jan 31 '23 12:01

Mark Byers