|
|
Archives of the TeradataForum
Message Posted: Mon, 15 Mar 2004 @ 18:06:01 GMT
Subj: | | Re: Odd explain plan in a query using MINUS |
|
From: | | John Adams |
On Mon, 15 Mar 2004 17:27:16 -0000, David Wellman wrote:
| I've seen the same things with UNION. (I think) What's happening is that Teradata is hashing the entire row and distributing based on that
hash, then looking within the set of rows with same rowhash for duplicates in order to do the MINUS function. "It ain't pretty" and it could be
done another way, but I think you'll find that is what is happening. | |
Eww! That really does sound awful. Why doesn't it spool out locally on each AMP, hashing the entire row and ordering by that value, and
do its checking there? I don't see any gain whatsoever in redistributing rows when both tables have identical PIs.
But thank you, David, for confirming that what I see here is what's actually happening, however unattractive it may be.
All the best,
John A
| |