June 2, 2014 at 10:17 am
Hi,
I am working with SP. I have to tune that sp.
I do have similar kind of code in two of the sp. I changed the distinct to group by. I found that 200-300msec in one sproc but in the other sproc same code I change same but there is no difference.
I am not able to understand.
It is using the same tables and same data we are retrieving.
June 2, 2014 at 10:24 am
You should really stop believing in myths. Group by and Distinct are designed for different cases. When you're grouping use group by and when you want to eliminate duplicates use distinct. Performance is not a reason to change from one to another.
June 2, 2014 at 2:00 pm
ramana3327 (6/2/2014)
Hi,I am working with SP. I have to tune that sp.
I do have similar kind of code in two of the sp. I changed the distinct to group by. I found that 200-300msec in one sproc but in the other sproc same code I change same but there is no difference.
I am not able to understand.
It is using the same tables and same data we are retrieving.
Without table/index DDL and actual execution plan, there's not much we can say here.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply