 |
 |
Archives of the TeradataForum
Message Posted: Tue, 11 Mar 2008 @ 16:52:20 GMT
Subj: | | Re: Spool space problem & questions |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Tue, 11 Mar 2008 10:43 -->
SELECT TOP 1000 ...
Depends. If FROM a table or simple single-table view and you have no ORDER BY / GROUP BY / etc., then Teradata can retrieve any 1000 rows
without using spool first.
But if there is any join, sort, aggregation, stat function (either in the query itself or within a referenced view) then Teradata will likely
materialize the entire answer set in spool before selecting and returning the "TOP" rows.
| |