There can be two kinds of left joins, or outer joins:
- Left outer join
- Right outer join
This type of outer join will return all rows from the left or right table, and only those rows that match from the right or left table. This is handy when there may be missing values in the other table, but you want to get a description or other information from the other table. The following image shows the working of outer joins, represented as a VENN diagram:
Rows for which matching values are derived will be NULL
in each case of join.
You need to connect to the Teradata database using SQLA or Studio. Identify the query in which left join is causing performance issues.
- Connect to the Teradata database using SQLA or Studio.
- Write
SHOW
in front of the query and execute it to get the list of all objects in the query, with their definitions. - Once you have DDLs of all the objects, check the columns involved in joins.
- Execute
EXPLAIN
for the query by pressing F6 in...