i have a table called orders. one column on order is customer_id
i have a table called customers with 10 fields
Given the two options if i want to build up an array
The single join would still be faster, in my opinion, because a DBMS will always execute the where clauses before joins are performed. This means that before and joining happens, all the tables involved have already been cut down to the minimum possible size.
The fact remains that in order get what you want you will have to read from all these tables at some point of time... so doing it once will still me much more efficient.
The key here is that the tables are all cut down to the minimum size before joining, and that we're using inner joins. If both these conditions change (some outer joins are okay) then you might have problems.