I have a requirement to improve below distinct slow query to use group by
(or any other suggestion...)
insert into #temp1
select distinct col1, '', 'known',col2, col3
from mytable
Help please.
Index is only on col1
which is int type.
Rest of columns are varchar(10)
It's a Sybase query but any SQL compliant code would do(i.e. no CTE). regards.