Question:
Does it make a difference in placing an OUTER or simply a JOIN or a WHERE?
Using WHERE:
select tb01_field01,tbl01_field02 from tb01,tb02 where tb01_field01 = tb02_field01
Using JOIN:
SELECT TB01_FIELD01,TB01_FIELD02 FROM TB01 JOIN TB02 ON TB01_FIELD01 = TB02_FIELD01
How do I use OUTER to do the same thing as the commands above? Is it faster with OUTER?
Answer:
Your second instance, “Using JOIN”, is not valid SQL in Informix. It should be:
SELECT TB01_FIELD01,TB01_FIELD02 FROM TB01, TB02 WHERE TB01_FIELD01 = TB02_FIELD01
The OUTER statement only deals with what happens when one of the tables has rows that are not matched by the JOIN. It is probably a little slower than a regular JOIN, because it has to include rows that would not be returned in a non-OUTER join.