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
Explain vproc in teradata?
If a Node is busy what are the steps you can take to avoid ?
how do you manage the production space. what are the proactive methods you can take ?
How is the teradata different from oracle?
What is the use of teradata system software?
What is upsert statement in teradata?
Define views in teradata with general syntax.
what are the day to day activities of teradata DBA ?
Syntax for case when statement?
What is the particular designated level at which a LOCK is liable to be applied in Teradata?
Let us say there is a file that consists of 100 records out of which we need to skip the first and the last 20 records. What will the code snippet?
What is spool space and when running a job if it reaches the maximum spool space how you solve the problem?
How many sessions of MAX is PE capable of handling at a particular time?
How to write the query . eid enm doj dob i want to display the names who worked more than 25 years .
Highlight the limitations of TPUMP Utility.