Suppose the following SQL pseudocode:
select ... from A join B
on A.serial=27 and B.serial=34 and A.id=B.id;
This is Oracle, Not MySQL.
You don't need indexes for the
id columns for join purposes, however -
it is a good idea to define ID columns as primary keys and this implicitly creates unique indexes
You do need indexes on the
Create index A_IX_SERIAL on A (SERIAL); Create index B_IX_SERIAL on B (SERIAL);
How much is "much less rows"?
As much rows are return, it becomes a less good idea to use index.