Archives of the TeradataForum
Message Posted: Mon, 12 May 2008 @ 22:18:59 GMT
Subj: | | Re: Regarding Spool Space and Global Temp Tables |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Mon, 12 May 2008 16:13 -->
They are charged as Temporary space versus Spool space as far as accounting is concerned, but that's not really a factor.
The difference is that you choose the Primary Index for a Global Temporary Table; the optimizer selects the "primary index" for a spool file.
Generally the spool file will be hash distributed in a way that makes sense for the next step in the query plan.
If the optimizer is making a poor choice for spool file hash distribution, you may simply be missing stats that would let the optimizer
discover what you already know (e.g. that certain columns have very uneven distribution of values and are poor candidates for PI).
|