Archives of the TeradataForum
Message Posted: Tue, 05 Jul 2005 @ 15:45:10 GMT
Subj: | | Re: BTEQ-LIMIT and Oracle ROWNUM |
|
From: | | Street, John |
Retlimit stops the retrieval at the stated point, so the SQL query does ALL the work but only returns the number of rows. So yes the SQL will
have to do all the work first to resolve the answer set
Other options are to use sample - if value is < 1 then it's a percentage > 1 then it is number of rows.
In V2R6 there is the TOP n construct that gets only n rows from the select.
Cheers
John
|