How inner and outer tables are determined

The outer table is usually the one that has:

The inner table usually has:

For example, when you join a large, unindexed table to a smaller table with indexes on the join key, the optimizer chooses: