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 / anil sharma

Group apply before where clause and distinct apply after
where clause.
So group by is good.

Is This Answer Correct ?    4 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain features and concepts of analysis services?

504


What is a fan-out query in SQL Azure?

99


What does it mean to manipulate data?

566


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1472


How can you tell if a database object is invalid?

619






What is provisioning, billing and metering, and connection routing concepts in the service layer?

92


What is the correct order of the logical query processing phases?

527


What is replication with database mirroring? : sql server database administration

535


What is de-normalization in sql database administration? Give examples?

538


What is compression - row-level and page-level compression?

535


List down some advantages of sql stored procedure?

564


A trigger can reference objects outside the current database? State true or false.

554


what are constraints? : Sql server database administration

526


How do users use Report Builder with SQL Server data sources?

119


Is mysql the same as sql server?

515