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 are the database roles? : sql server security

555


What is the benefit of normalization?

581


Why union all is faster than union?

501


Explain the properties of a relational table?

551


What purpose does the model database server?

648






What is the use of partition by in sql server?

504


Why do we use functions?

503


What is dml command?

539


How do we know if any query is retrieving a large amount of data or very little data?

546


Explain the database you used in your final year project?

532


Explain different backup plans?

525


Explain the stored procedure?

627


What is the most common type of join?

520


What is nested transaction?

529


How to update muliple row in single query?

603