Assuming an index on cCustNum field, which would be better in terms of performance?
1) select distinct cCustNum from MyTable where <somecondition>
2) select cCustNum from MyTable where <somecondition> GROUP BY cCustNum
QA's estimated execution plan seems to show that these are identical, but I thought I had heard some time ago that GROUP BY was optimizable moreso that DISTINCT.
BOL seems to give no clear indication when I searched.
tia!
--Michael
1) select distinct cCustNum from MyTable where <somecondition>
2) select cCustNum from MyTable where <somecondition> GROUP BY cCustNum
QA's estimated execution plan seems to show that these are identical, but I thought I had heard some time ago that GROUP BY was optimizable moreso that DISTINCT.
BOL seems to give no clear indication when I searched.
tia!
--Michael