|
|
Archives of the TeradataForum
Message Posted: Wed, 15 May 2002 @ 06:52:59 GMT
Subj: | | Re: Sequential number generation |
|
From: | | Dieter N�th |
| Why even bother with the key column(s)? | |
| Use csum(1,1). But I have still not verified if this would avoid the costly sort... | |
This is the worst thing you can do.
All rows are redistributed according to the order cols (1). So in spool _all_ rows are located on a single AMP. You should always
specify cols with a good distribution, PI cols are fine. If you have to many cols and it's a query without join, just use csum(1,rowid) or
rank(rowid).
Dieter
| |