Let's say I have three tables.
Table 1 contains 10000 rows
Table 2 contains 5000 rows
Table 3 contains 4000 rows
When joining table 1 and 2, it will return 2000 rows.
If i used ORDERED hint, which table whould be better to be placed as driving table? Table will the least rows? or joined tables which return the smallest result set (for example, table 1 and table 2 joined return 2000 rows)?
Which table sequence is better.
Sequence 1
SELECT /*+ ORDERED*/ column a.1, b.2, c.3
FROM table_1 a
, table_2 b
, table_3 c
WHERE a.column1=b.column2
and a.column3 = 2008
and a.column1 = c.column1
Sequence 2
SELECT /*+ ORDERED*/ column a.1, b.2, c.3
FROM table_2 a
, table_1 b
, table_3 c
WHERE a.column1=b.column2
and a.column3 = 2008
and a.column1 = c.column1
Sequence 3
SELECT /*+ ORDERED*/ column a.1, b.2, c.3
FROM table_3 a
, table_2 b
, table_1 c
WHERE a.column1=b.column2
and a.column3 = 2008
and a.column1 = c.column1