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
If a Node is busy what are the steps you can take to avoid ?
What are differences between teradata and ansi session modes in teradata?
How will you solve the problem that occurs during update?
Mention a few of the ETL tools that come under Teradata.
My table got locked during mload due to a failed job. What do I do to perform other operations on it?
Can you fastexport a field, which is primary key by putting equality on that key?
How many codd's rules are satisfied by teradata database?
What is stored procedure in teradata?
How to Extract data from multiple legacy systems?
What are the different softwares used with their functions in teradata?
Define views in teradata with syntax.
What are the different functions performed in development phase?
What are some commonly used bteq scripts?
What are some primary characteristics of teradata?
What is spool space? Why do you get spool space errors? How do trouble-shoot them?