 |
 |
Archives of the TeradataForum
Message Posted: Tue, 21 Jun 2011 @ 12:32:47 GMT
Subj: | | Re: Distinct vs. group by in TD 13 onwards |
|
From: | | Fenwick, Ruth |
For those already on TD13, would someone check:
Are both DISTINCT and GROUP BY single amp for the following type of query:
SELECT COL1, COL2, COL3 FROM TABLE WHERE PRIMARY INDEX = 123 GROUP BY 1,2,3
; SELECT DISTINCT COL1, COL2, COL3 FROM TABLE WHERE PRIMARY INDEX = 123;
For TD12 and below, a DISTINCT is single amp, GROUP BY is all AMP. We have 'faked out' the optimizer, by having tactical applications
always code DISTINCT.
Ruth
| |