Archives of the TeradataForum
Message Posted: Sat, 21 Nov 2009 @ 17:50:04 GMT
Subj: | | Re: Query tuning - same step running twice |
|
From: | | Fred W Pluebell |
It's not "repeating the process", so you can't avoid it unless you can change the access plan entirely.
The PM/API version of the EXPLAIN text doesn't include enough detail to say for certain what is happening. Depending on your Teradata release,
if you do a regular SQL EXPLAIN the purpose may be clearly stated.
As others have suggested, perhaps there is an expression that is being evaluated or "materialized" after the join and before the result set is
used in the following step(s).
You may also have steps that "re-order" (sort or hash) data, without necessarily redistributing it across AMPs, in preparation for the next
join.
That would be fairly typical following a MINUS ALL join, so I suspect that's the reason in your example. And re-ordering is inherently more
costly than merging/joining, for the same number of rows
|