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 / hitesh kumar vyas s

Performance wise Distinct is more effective than group by.
Since in group by it has to group and then provide the
result but this is not the case in distinct

Is This Answer Correct ?    3 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a dataset and what are the different types of datasets?

93


What are the dmvs? : sql server database administration

601


What command must you use to include the not null constraint after a table has already been created?

546


Is null in sql server?

544


how many no of arguments can be passed in procedures and functions

4787






What are the different type of replication in sql server?

540


what is unique and xaml nonclustered index

561


What is factless fact table? : sql server analysis services, ssas

567


What is measure group, measure? : sql server analysis services, ssas

556


Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?

106


Can sql server 2016 run on windows 7?

508


What is cte (common table expression)?

601


Does a specific recovery model need to be used for a replicated database? : sql server replication

536


What is a trace frag?

648


What is query processing?

547