|
Archives of the TeradataForumMessage Posted: Thu, 23 Feb 2012 @ 22:03:50 GMT
I didn't see the original question or Dieter's response but think of it in these terms. A cursor processes one row at a time on a single PE on a single node - all the rest of the AMP's and nodes aren't helping. Whereas in set operations all nodes (assuming no skew) are processing the data at the same time. To use an analogy - imaging a bank branch with 10 tellers (or a supermarket with 10 checkout lanes). The queue of customers is the data in the result set presented to the cursor. But there is this thing called a gatekeeper (a.k.a. cursor) who only ever allows one customer at a time into the branch (checkout area) for processing. That customer must be completely processed before the gatekeeper (cursor) allows the next customer (row) into the processing area. So there is only ever one teller (checkout) operating at a time. All the rest of the tellers(checkouts) are not helping process the work. So the obvious question is why would you do that that would always be slow. Right? it would be much better to let a SET of 10 customers through in one go and service them in parallel - one at each checkout lane. That is how set operations (sort of ) work in the Teradata environment. Hope this helps in some small way. Glenn Mc
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||