Archives of the TeradataForum
Message Posted: Tue, 11 Mar 2008 @ 16:52:20 GMT
<-- 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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|