sel a.t1,b.t1 from emp a left outer join dept b ON
a.id=b.id where b.deptno=10;
sel a.t1,b.t1 from emp a left outer join dept b ON
a.id=b.id and b.deptno=10;
what is the difference on the above 2 queries?
Answer Posted / tdguy
This is a good question. If we look at the explain plans,we
would be able to understand the difference.
1. In the first query, the condition given in where clause
is applied after the left outer join process on the tables.
This means that it is a plain left outer jon on id column
between the tables and the where condition is applied after
the join process. This can be seen in the explain plan as
"by way of a RowHash match scan with a condition".
2. In the second query, the condition given in and
statement clause is applied along with the left outer join
process on the tables. This means that it is a left outer
jon on id column between the tables with table b with only
one row. This can be seen in the explain plan as
"by way of a RowHash match scan with no residual conditions
".
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Can we have two time dimensions in a schema(either star or snow flake)? For ex if we want joining date of employee and if we want today's sales with time whether can we have two time dimensions for accommodating above tasks?
What are the components used in smp and massively parallel processing (mpp) machines?
What is difference between user and database in teradata?
What are the functions involved in shared information architecture?
In general, how do you optimze any sql in teradata?
Explain some differences between mpp and smp?
There is a column with date in it. If I want to get just month how it can be done? Can I use sub string?
Syntax for case when statement?
What are the design features involved in teradata?
List the logical and conditional operators that are used with teradata along with their meanings?
Highlight all the modes that are present under Confidence Level.
What are aggregate tables? How do you design them using teradata?
Hi Friends, Please send me Teradata Materials for certifications Thanks in advance !!
Define views in teradata with syntax.
Explain teradata vs. Redshift?