|
|
Archives of the TeradataForum
Message Posted: Thu, 20 Oct 2005 @ 14:39:58 GMT
Subj: | | Re: Why do I get a spool space error |
|
From: | | Victor Sokovin |
| Your spool space problems is caused by the implied SELECT DISTINCT within your sub-select and the differences between a SELECT DISTINCT and
a SELECT ....GROUP BY.....both provide the same answer but work differently and depending on your data one will be more efficient that the
other. | |
I, for one, don't see any implied DISTINCT in the original query. I had the same conjecture initially but had to reject it.
| When there are few duplicates to remove a SELECT DISTINCT is more efficient | |
| When there are many duplicates to remove a SELECT ... GROUP BY is more efficient | |
Right; but the OP seems to have no duplicates at all but GROUP BY is still doing its magic.
I think the case reported here might be something new.
Regards,
Victor
| |