June 11, 2013 at 10:56 am
I want to do this.
select count(*) from
(
select col1,col2,......col18 from REVemployee.tbemp
group by col1,col2,......col18 HAVING COUNT(*)>1
)a
is there a better way of doing the same for better proformance?
June 12, 2013 at 3:00 am
Tara-1044200 (6/11/2013)
I want to do this.select count(*) from
(
select col1,col2,......col18 from REVemployee.tbemp
group by col1,col2,......col18 HAVING COUNT(*)>1
)a
is there a better way of doing the same for better proformance?
Looks fine to me. But you also can try this:
select count(*) from
(
select null a from REVemployee.tbemp
group by col1,col2,......col18 HAVING COUNT(*)>1
)a
You might have slightly better performance.
You can also find duplicates using windowed function, but this very likely to be much slower.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply