Archives of the TeradataForum
Message Posted: Wed, 09 Feb 2005 @ 13:58:48 GMT
Subj: | | Re: Sorting in teradata |
|
From: | | Michael Larkins |
The following example you provided does not do a sort since there is no ORDER BY.
select * from emp where sal > 30000
However, once an ORDER BY is specified, you are correct in that each AMP sorts only the rows that it "owns" based on SPOOL. There are no
sorts in Teradata once every AMP has finished.
Instead, as each AMP sends its rows to the BYNET drivers, these drivers merge the rows from each AMP before they go back to the user. This is
a very unique aspect of Teradata and one of the reasons that BYNET drivers are necessary even for a single node system. The difference is that a
single node system has no BYNET and use to be referred to as the VNET (not sure if the term is still used).
Hope this helps.
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
|