Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In performance wise distinct is good or group by is good?
eg:select name from emp group by name;
select distinct name from emp;

Answer Posted / ghorban adabi

I have test DISTINCT and GROUP BY query on a table in my
site db with 7800 record. the results that turned GROUP BY
was faster than DISTINCT!!!
GROUP BY result -> Query took 0.0094 sec
DISTINCT result -> Query took 0.0133 sec

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you delete a data source?

1005


What is 1nf 2nf?

1005


What is the new security features added in sql server 2014? : sql server security

996


What are the five characteristics of good data?

913


What are pessimistic lock and optimistic lock?

1069


Do you know the policy based administration feature of sql server 2008?

954


How to make conditional sum in ssrs?

177


What is the difference between TRUNCATE and DROP?

1135


Describe different Processing Modes offered by SSRS?

248


What is the difference between getdate and sysdatetime?

1002


What is a select query statement in ms sql server?

1071


How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?

1036


What does null mean?

980


What is statement level trigger?

979


What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas

1044