Home » RDBMS Server » Performance Tuning » SQL Tuning - Distinct Vs Group by
SQL Tuning - Distinct Vs Group by [message #220561] Wed, 21 February 2007 05:01 Go to next message
Messages: 56
Registered: July 2005
Location: Indore

Hi all,
I am having a table say
e(empname, phone) where one emp can have more then one phone number.
To get the distinct empname from the table I can use following two queries -
1. select distinct empname from e;
2. Select empname from e group by empname;

Which one is more efficient and why?
With regards
Amit Nanote
Re: SQL Tuning - Distinct Vs Group by [message #220563 is a reply to message #220561] Wed, 21 February 2007 05:07 Go to previous message
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Check this
link , that will give you what you're looking for
Previous Topic: NOt EXISTS & NOT IN ???
Next Topic: ora-1555
Goto Forum:

Current Time: Tue Oct 25 12:23:53 CDT 2016

Total time taken to generate the page: 0.10961 seconds