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
Explain features and concepts of analysis services?
What is a fan-out query in SQL Azure?
What does it mean to manipulate data?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
How can you tell if a database object is invalid?
What is provisioning, billing and metering, and connection routing concepts in the service layer?
What is the correct order of the logical query processing phases?
What is replication with database mirroring? : sql server database administration
What is de-normalization in sql database administration? Give examples?
What is compression - row-level and page-level compression?
List down some advantages of sql stored procedure?
A trigger can reference objects outside the current database? State true or false.
what are constraints? : Sql server database administration
How do users use Report Builder with SQL Server data sources?
Is mysql the same as sql server?