Archives of the TeradataForum
Message Posted: Tue, 03 Nov 2015 @ 21:30:00 GMT
Subj: | | Re: Generating Random Records |
|
From: | | Dempsey, Mike |
How to do this may depend on your definition of 'random'.
Teradata fetches rows in parallel and does not sort them unless you tell it to. If you just fetch 'n' rows from a table - with no Order by or
Where clause - those rows will effectively be random.
You can use "Select Top n ..."
Or "Select ... Sample n"
I don't think either of these performs any sorting so you should get an essentially random set of rows. (Check the docs for details just to be
sure ... and maybe they will tell you which is better performance)
Mike Dempsey
|