Quantcast
Channel: Teradata Developer Exchange - Blog activity for carrie's blog
Viewing all articles
Browse latest Browse all 1058

Teradata Basics: Parallelism - comment by carrie

$
0
0

Hi Pierre,
 
I am concerned that you may have misiinterpreted one of the details in the posting.
 
This statement that you quote:  "any sub-expressions that the different SQL statements have in common will be executed once and the results shared among them (AMPs)" does not mean "shared among AMPs"  but "shared among the different statements within the multi-statement request".   I should have stated that more explicitly.  
 
If two or more of the statements in the request contain the same subquery, instead of executing the sub-query two or more times (1 per statement that contains it), the subquery is only executed once and it's spool is re-used in all the statements that need it.  So in this case the multi-statement request does slightly less work than if each statement were executed serially.
 
In terms of AWT usage, the multi-statement request will be broken down into individual steps just like any query, so while it may run longer than any single-statement request, it shouldn't use any more AWTs at any point in time than a serial execution of all statements would.  The only exception is if for some reason the multi-statement request plan had more parallel steps.    Under normal circumstances a request is not allowed to use more than 4 AWTs concurrently, whether it is a single statement request or a multi-statement request.   So I don't expect more stress on AWTs by using multi-statement requests.
 
Thanks, -Carrie


Viewing all articles
Browse latest Browse all 1058

Trending Articles