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

Working with TLogs

1839


Differentiate between a primary key and a unique key.

1076


What is Federation and Federation Member?

92


If you want to send some data from access database to sql server database. What are different component of ssis will you use?

988


Do you know what are the steps to process a single select statement?

978


What is 1nf normalization form?

1041


What is usually the first word in a sql query?

1138


What are scalar functions in sql?

1151


What do you mean by SQL injection attack?

1077


I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration

1122


How to defragment indexes with alter index ... Reorganize?

1089


Give me a SQL Query to find out the second largest company?

1169


What the different components of Replication and what is their use?

1072


tell me what is blocking and how would you troubleshoot it? : Sql server database administration

908


Define outer join in sql server joins?

941